for each (var layer:Layer in map.layers) { if (layer is ArcGISDynamicMapServiceLayer){ var visLayers:Array =[]; //NOT WORK !!!!! visLayers = ArcGISDynamicMapServiceLayer(layer).visibleLayers; } }
visibleLayers property visibleLayers:ArrayCollectionSets the visible layers of the exported map. By default, the visible layers are as defined by the default visibility in LayerInfo.This property can be used as the source for data binding.Implementation public function get visibleLayers():ArrayCollection public function set visibleLayers(value:ArrayCollection):void
for each (var layer:Layer in map.layers) { if (layer is ArcGISDynamicMapServiceLayer){ var visLayers:ArrayCollection = new ArrayCollection; visLayers = ArcGISDynamicMapServiceLayer(layer).visibleLayers; Alert.show(visLayers.source.join(",")); // ex : result : 0,1,2,4,7,8 } }
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.