private function showStateLegend(event:MouseEvent):void { WidgetEffects.flipWidget(this, viewStack, "selectedIndex", 2, 400); //This is where we determine if this is the first call to make //the legend or do we just need to update it if (legendRepeater.dataProvider != null){ updateLegend(); } else { showMessage("Please be patient while the Legend is generated...", true); var liveLayers:Array = getLayers(); var url:String; for (var i:int = 0; i < liveLayers.length;i++) { if (liveLayers is ArcGISDynamicMapServiceLayer) { requestCount++; url = ArcGISDynamicMapServiceLayer(liveLayers).url.replace("rest/", ""); // - debugging showMessage(url, true); showMessage(i.toString(), true); showMessage("opening webService...", true); webService.generateLegends.send(url, 96, 20, 20, ArcGISDynamicMapServiceLayer(liveLayers).id); showMessage("ended webService...", true); } else if (liveLayers is ArcGISTiledMapServiceLayer) { requestCount++; url = ArcGISTiledMapServiceLayer(liveLayers).url.replace("rest/", ""); showMessage(url, true); showMessage(i.toString(), true); showMessage("opening webService for tiled...", true); webService.generateLegends.send(url, 96, 20, 20, ArcGISTiledMapServiceLayer(liveLayers).id); showMessage("ended webService for tiled...", true); } } showMessage("got through the for loop...", true); } }
Membros conectados podem postar, seguir atualizações e mais. Novo aqui? Registre uma conta gratuita.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.