1

I am new to ArcGIS and it's API. I am using NLiu's TOC widget for displaying the layers. It is working perfectly, however, I wanted to keep all layers unchecked when it is loading on the browser (for performance reason).

I used the visible property of dynamic layer as:

var layer= new esri.layers.ArcGISDynamicMapServiceLayer(mapService,{"visible": false});

This hides the layer, but when I am expanding its childs, all of them are selected (checked), when I am clicking to uncheck one, the rest others are displaying back.

So, what I want, to keep all its child nodes un-selected, when I am checking a single checkbox, so it should display its relevant data on the map.

I tried to find a way on its javascript files but not succeed.

  • Which version of the API are you using? Can you post a link to the TOC code you're using? Can you post a simplified example demo (maybe using jsbin.com or similar)? – GavinR Jul 12 at 13:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.