Solved! Go to Solution.
Hi Forum,
I was hoping to be able to obtain an array from the TOC widget and feed that to my identify task
Hi Forum,
I was hoping to be able to obtain an array from the TOC widget and feed that to my identify task
You do not need the TOC to tell you which layer is visible.
For service level layer, you should be using Layer.visible. For layers underneath a dynamic map service, use ArcGISDynamicMapServiceLayer.visibleLayers.
It is a great widget
I use BasemapGallery object to navigate my map services. so when I change the map service, how refresh the TOC control?
You do not need the TOC to tell you which layer is visible.
For service level layer, you should be using Layer.visible. For layers underneath a dynamic map service, use ArcGISDynamicMapServiceLayer.visibleLayers.
BasemapGallery has an event onSelectionChange - listen for this, and refresh the TOC when this occurs.