What parameters can be used with .../MapServer?f=jsapi to alter the results, like turning on or off a single layer?


When browsing an ArcGIS REST Services Directory one of the options at a MapServer level is to "view in ArcGIS JavaScript":

http://services.arcgisonline.com/arcgis/rest/services/Specialty/Soil_Survey_Map/MapServer screenshot

This leads to a light-weight web map with minimal chrome, widgets, etc. and no reliance on a 3rd party server like ArcGIS Online to draw the results. It is really handy for having a quick look at the service, with a bonus of having a shareable URL that anyone can see.

http://services.arcgisonline.com/arcgis/rest/services/Specialty/Soil_Survey_Map/MapServer?f=jsapi jsapi map screenshot

The problem, from my present perspective, is that the view is limited to the default definition in the MapServer service definition. In this soil survey example there are 3 layers in the MapServer. What I'd like to be able to do is use the same minimal-chrome webmap to view just one of those layers, not the whole map.

screenshot of desired layer listing

This Soils Survey isn't the best example of my dilemma since the desired layer will draw at the appropriate zoom level. The circumstance which prompted this question is a map service that has layers turned off by default. I can use ArcGIS Online's Use URL parameters to modify maps &layers=show:2,4 to fix that, but that invokes overhead and complexity I'm trying to avoid (using multiple servers and services for mere data viewing).

1 Answer 1


That is just a basic viewer page to allow you to see the service. It's not meant to be used as an "app" and as far as I know, the ability to pass parameters to that page is not supported.

  • Absence of a doc page and public discussion for it says you're right. However there's a world of difference between supported and possible. ;-) I hold hope for the latter... Oct 1, 2017 at 4:53
  • 2
    Matt, no, it's not even "possible" - a quick View Source confirms that. Your solution for using ArcGIS Online URL parameters is probably the easiest solution :) Oct 2, 2017 at 17:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.