Select to view content in your preferred language

Rest dynamic map service service does not display in Tax Parcel Viewer 10.1

4427
20
03-13-2013 03:32 PM
davidwray
Emerging Contributor
The following Rest service does not display as a operational layer when isVisible = false

http://arcgisweb.roanokecountyva.gov/arcgisweb/rest/services/Z2/MapServer/0

When I change isVisible = true the service will display, but I cannot toggle on and off.

Any ideas?
0 Kudos
20 Replies
ScottOppmann
Esri Contributor
David -

I would contact Esri Support Services to get help with this specific issue.  They can help you troubleshoot the issue more deeply.

One quick check - I would assume you're trying to add the parcels as a dynamic service in the operational layers area of the config?And I assume you're service is in the same projection as your basemaps, etc.? 

Scott
0 Kudos
davidwray
Emerging Contributor
Hi Scott,

I contacted Tech support and the answer I got was a bug in the code.  Yes, you are correct and I am
trying to add Zoning as an operational layer in the config file and it is in the same projection.  In my
opinion the problem is with the complexity of the symbology in the map service.

Very unfortunate,
David
0 Kudos
MikeTschudi
Frequent Contributor
Hi David,

Thank you for the information and the URL of the service that you were using. We did have a bug that prevented a layer that didn't have a symbol renderer from appearing in the basemap switcher box. Without the checkbox in the switcher, you can't change the visibility from the user interface.

This has been fixed in the latest version of the Tax Parcel Viewer in Esri's github site: a default symbol is provided for the layer.

Thanks,
Mike
0 Kudos
davidwray
Emerging Contributor
Hi David,

Thank you for the information and the URL of the service that you were using. We did have a bug that prevented a layer that didn't have a symbol renderer from appearing in the basemap switcher box. Without the checkbox in the switcher, you can't change the visibility from the user interface.

This has been fixed in the latest version of the Tax Parcel Viewer in Esri's github site: a default symbol is provided for the layer.

Thanks,
Mike




Thanks Mike!  The Layer adds to the map perfectly.  One last question,  my map service, please see below is transparent, but
when I add it to the map the service is not transparent.  Any ideas on how I can solve this problem?

http://arcgisweb.roanokecountyva.gov/arcgisweb/rest/services/LGM/Zoning_Transparent/MapServer/0

All the Best,
David
0 Kudos
MikeTschudi
Frequent Contributor
Hi David,

You can get this by adding a line to the js/utils.js file; where you see the lines
function CreateDynamicServiceLayer(layerURL, layerIndex, layerId, isVisible, displayName) {
    var imageParams = new esri.layers.ImageParameters();
    var lastindex = layerURL.lastIndexOf('/');
    imageParams.layerIds = [layerIndex];
    imageParams.layerOption = esri.layers.ImageParameters.LAYER_OPTION_SHOW;
    imageParams.format = "jpeg";
    var dynamicLayer = layerURL.substring(0, lastindex);
    var dynamicMapService = new esri.layers.ArcGISDynamicMapServiceLayer(dynamicLayer, {
        id: layerId,
        imageParameters: imageParams,
        visible: isVisible
    });
    var initiallyVisible = isVisible;

insert the highlighted line to have your map service send the JPEG format instead of the default PNG8.

Regards,
Mike
0 Kudos
davidwray
Emerging Contributor
Hi Mike,

I am trying to use the Tax Parcel Viewer as a School Finder for the Police Department and I need to use Secure Rest Services.  Does the tax parcel viewer support using token based security?  If so is there any documentation on how to configure the app?  It has proxy.cfg and proxy.ashx files in the application   folder so it would seem to be fairly easy to configure if the Tax Parcel App will support it.  Thanks for    your help!

David
0 Kudos
MikeTschudi
Frequent Contributor
Hi David,

The proxy.* files in Tax Parcel Viewer just support cross-domain access--they don't have token support.  If the secure REST services are on ArcGIS.com, I'd recommend the proxy.* from Esri's map-and-app-gallery app (see this post) along with a modification to the Tax Parcel Viewer to set esriConfig.defaults.io.alwaysUseProxy to true in js\homePage.js.  (Note that we just released a new version of Tax Parcel Viewer to Esri's GitHub site.) This version of proxy.ashx requires that all of the query services need to have the same URL prefix , e.g., "http://www.arcgis.com/sharing/", but the program can be modified. There may be some additional tweaking to the app for the secure URLs, but I think that it's doable.  If the secure REST services are hosted elsewhere, then some custom modifications may be necessary to the proxy.ashx program to adhere to that server's token rules.

Rather than use Tax Parcel Viewer, have you considered adapting Park and Recreation Finder? I mention it because it's been a popular base for custom finders.

Regards,
Mike
0 Kudos
davidwray
Emerging Contributor
Hi Mike,

I currently have the Tax Parcel Viewer 10.1 working with Secure Rest Services and dynamically
generated tokens using ESRI proxy files.  Since reading your post I downloaded the 10.2 version
from GITHUB and have installed on my test server.  The app will Load and will query and return
results in the search window but when i click or select one record to zoom-to, the app will fail to
load and will continue loading.  I have made the app publicly available here:
http://picolsvr.roanokecountyva.gov/taxmaster102a/

and the app with Roanoke County data is located here:
  http://picolsvr.roanokecountyva.gov/taxmaster102/

Any ideas on the problem and a solution?
The AutoComplete is a really nice new feature and it works well.
Once this problem is resolved would it be possible to use the proxy files that I was using with
version 10.1 with v.10.2?

If not, what is needed to get the app working with Secure Rest Services on a local ArcGIS Server?

I have seen the Parks and Rec Finder and it is a nice app.  I plan on deploying that App on our site
in the future but we are currently collecting data to use in the App. 

Does the App support Mobile devices?
Are their plans to add Autocomplete functionality to the App? 

I plan to add the Schools to the app and see how well it works.

Thanks for all that you and the Local Gov't Team do to make GIS successful at the local level.

All the Best,
David
0 Kudos
MikeTschudi
Frequent Contributor
Hi David,

Both sites are getting stuck by a flaw in the app that's preventing the selected parcel's popup from appearing. Please change line 686 in js\locator.js from
dijit.byId("divProperty").select();

to
dijit.byId("divProperty").selected = true;

I've made this change to the github version.

The ArcGIS authentication that the proxy uses has not changed from 10.1 to 10.2, so you can continue to use that proxy program.

The current version of Parks and Rec Finder supports mobile devices and has autocomplete. It will be available in the upcoming 10.2 release, or you can get it now from the Esri GitHub site (https://github.com/Esri/park-and-recreation-finder). (However, as with the other almost-10.2 apps in our GitHub site, such as tax-parcel-viewer, it is undergoing testing right now. When the repository commit is tagged with "10.2", you'll have the version that goes into arcgis.com and will be supported.)

Regards,
Mike
0 Kudos