AnsweredAssumed Answered

When is onLoad event triggered using esri.arcgis.utils.createMap?

Question asked by myESRIUName on Nov 20, 2012
Latest reply on Nov 20, 2012 by myESRIUName
Many of the JavaScript API Samples show a map created and the "resize" event trapped as follows:

map = new esri.Map("mapDiv", {      extent: new esri.geometry.Extent(17198,6008256, 506394, 6497452, new esri.SpatialReference({wkid: 102100 })) });  dojo.connect(map, 'onLoad', function(theMap) {     dojo.connect(dijit.byId('map'), 'resize', map,map.resize); });

How would you do same if you were using esri.arcgis.utils.createMap() with a map id instead? That is, as far as I can tell, by the time I actually have the map object to pass to the dojo.connect, its onLoad event has already happened automatically (unlike above, where I can add the event listener and then add the layers to the map).

Am I understanding this correctly? And, if so, what would be the appropriate event to listen for to do this when doing a createMap vs. new esri.Map?