AnsweredAssumed Answered

manipulating individual layers from an ArcGIS.com web map

Question asked by davidfkimball on May 15, 2014
Latest reply on May 20, 2014 by davidfkimball
I'm writing a custom ArcGIS Javascript API app. At the moment it shows an arcgis.com web map that it adds using:

arcgisUtils.createMap(webmapid, "mapDiv", {mapOptions: mapOptions}).then(function (response) { [INDENT]...[/INDENT] }


The web map contains two layers, each of which is a service from our ArcGIS Server. Each of those services contains multiple layers.

I used the code that Kelly Hutchins posted here:

http://forums.arcgis.com/threads/98632-Fairly-new-to-JS-api-need-help-toggling-feature-layers-served-by-AGO?p=350668&viewfull=1#post350668

to create checkboxes that let the user turn the layers on and off. The code creates two checkboxes, one for each service (in this case, one service is parkland and one is trails). I would like to have checkboxes for each of the datalayers in those two services (in the first service, park boundary lines and park polygons; in the second one, trail lines, related points, trail labels). I'd like the user to be able to turn off any of these "sub-layers".

Is this possible when using an ArcGIS.com web map?

If not, how would I achieve this?

Thanks, David.

Outcomes