FAQ: Why might a non-ESRI service not display successfully in a sample Web API viewer?
Why might a non-ESRI service not display successfully in a sample Web API viewer?
A common issue for users is that the Esri sample service displays successfully in the sample viewer but not their own map service.
The following checklist highlights the most common reasons for this behavior. This list is designed to be used as a quick reference to provide direction in the troubleshooting process.
Map Service Level 1. Is the referenced Map service valid, started and running?
Tip: Check the status of the Map service by accessing the ArcGIS Services or REST Services directory by using one of the following methods.
• For Microsoft .NET Framework:
Navigate to Windows Start menu > All Programs > ArcGIS > ArcGIS Server.
Follow the URL: http://<serverName>/<agsInstanceName>/REST/services and select <targetService>.
• For Java:
2. Is the URL referenced a REST or a SOAP URL?
• Example REST URL: http://<serverName>/<agsInstanceName>/REST/services/Mapserver/ • Example SOAP URL: http://<serverName>/<agsinstanceName>/services/Mapserver/
Tip: ESRI Web APIs are primarily designed to work with REST endpoints.
3. Is the appropriate layer type being used in the Map service?
Tip: A tiled, or cached, map service can be added as both a tiled and dynamic type. A dynamic, or non-cached, map service can only be added as dynamic type. It will not display if added as a tiled type.
Spatial Reference and Extent Level 1. Is the projection/spatial reference consistent in both the service and the map?
Tip: Map viewers are typically set to use the Web Mercator Auxiliary Sphere coordinate system by default. If the service consumed does not use the same coordinate system as the map viewer, or the first service added to the map, it may not display due to mismatched spatial references.
For testing purposes:
A. Remove all of the existing services. B. Add only the service that needs to be tested for display. C. Save the application, follow the steps listed for troubleshooting at the Browser Level (if required), and re-launch the viewer in a new instance of browser.
2. Are the initial extent values, if specified in the source code, appropriate to the service?
Tip: If the map viewer has 'initial extent' and/or 'full extent' values hardcoded in the source code, confirm that these values are appropriate to the spatial reference of the map service being consumed.
For testing purposes:
A. Navigate to ArcGIS Services directory > Target Service > 'Initial and Full Extent' sections. B. Copy these values and replace the original extent values in source code. C. Save the application, follow the steps listed for troubleshooting at the Browser Level (if required), and re-launch the viewer in a new instance of browser.
Security Level 1. Does the 'clientaccesspolicy' and\or 'crossdomain' file exist on the root of the ArcGIS Server?
Tip: If the service is secured, verify that a valid 'token' is provided for authorization process in the source code. If it is a distributed install, and a firewall is present between the Web server and the ArcGIS Server, verify that the firewall is configured appropriately to enable successful communication between the two servers.
Browser Level 1. Has the REST cache been cleared?
Clearing REST cache and restarting map service after making any changes to the service is typically recommended.