It's getting through the function showStateLegend(). I added some "showmessage()" to track it's progress: 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);
}
}
It does display the "got through the for loop..." which is after the for loop. It just spins the indicator.It's never getting to the getLegend_result() function.If I test the /restLegend/restLegend.asmx on the server, it is working.