I'm not quite experienced enough to know how to do the map load event listener. I did find however some code on a layerLoadHandler(). I created the below function and added load="layerLoadHandler()" to each of the layers being loaded - Bing Maps, ArcGISDynamicMapServiceLayer and the GraphicsLayer. I found that the function executed buy the Alert.show message but the zooming affect did not work.
Any addition help with the map load event listener or the code below would be appreciated. Thank you.
private function layerLoadHandler():void
{
var allLayersLoaded:Boolean = true;
for each (var id:String in myMap.layerIds)
{
var layer:Layer = myMap.getLayer(id);
if (!layer.loaded)
{
allLayersLoaded = false;
break;
}
}
if (allLayersLoaded)
{
Alert.show("All Layers Have Loaded!");
setTimeout(zoomNext, 2000, [ new Extent(-9811265, 5111444, -9791850, 5130706)]);
}
}