private function createChildren():void { children = null; var layerInfos:Array; // of LayerInfo var visibleLayers:Array; var li:LayerInfo; if (layer is ArcGISTiledMapServiceLayer){ layerInfos = ArcGISTiledMapServiceLayer(layer).layerInfos; }else if (layer is ArcGISDynamicMapServiceLayer){ var arcGISDynamicMapServiceLayer:ArcGISDynamicMapServiceLayer = ArcGISDynamicMapServiceLayer(layer); if (arcGISDynamicMapServiceLayer.visibleLayers == null) { //Added if check for bugfix trace("found null"); } else { arcGISDynamicMapServiceLayer.visibleLayers.addEventListener(CollectionEvent.COLLECTION_CHANGE, visibleLayersChangeHandler); } _visibleLayersChangeWatcher = ChangeWatcher.watch(arcGISDynamicMapServiceLayer, "visibleLayers", visibleLayersChange); _dynamicMapServiceLayerInfos = arcGISDynamicMapServiceLayer.dynamicLayerInfos ? arcGISDynamicMapServiceLayer.dynamicLayerInfos : arcGISDynamicMapServiceLayer.layerInfos; //Added per commit on GH if (_isVisibleLayersSet){ ....all code is the same for the rest of the createChildren function
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.