AnsweredAssumed Answered

manipulating individual layers from an 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 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:

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 web map?

If not, how would I achieve this?

Thanks, David.