<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: When is onLoad event triggered using esri.arcgis.utils.createMap? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/when-is-onload-event-triggered-using-esri-arcgis/m-p/253521#M23456</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;That's exactly what I needed to do. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you, Kelly!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;jtm&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 Nov 2012 19:38:49 GMT</pubDate>
    <dc:creator>JoanneMcGraw</dc:creator>
    <dc:date>2012-11-20T19:38:49Z</dc:date>
    <item>
      <title>When is onLoad event triggered using esri.arcgis.utils.createMap?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/when-is-onload-event-triggered-using-esri-arcgis/m-p/253519#M23454</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Many of the JavaScript API Samples show a map created and the "resize" event trapped as follows:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;map = new esri.Map("mapDiv", {&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; extent: new esri.geometry.Extent(17198,6008256, 506394, 6497452, new esri.SpatialReference({wkid: 102100 })) });&amp;nbsp; dojo.connect(map, 'onLoad', function(theMap) { &amp;nbsp;&amp;nbsp;&amp;nbsp; dojo.connect(dijit.byId('map'), 'resize', map,map.resize); });&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;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). &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;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? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;jtm&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Nov 2012 18:52:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/when-is-onload-event-triggered-using-esri-arcgis/m-p/253519#M23454</guid>
      <dc:creator>JoanneMcGraw</dc:creator>
      <dc:date>2012-11-20T18:52:25Z</dc:date>
    </item>
    <item>
      <title>Re: When is onLoad event triggered using esri.arcgis.utils.createMap?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/when-is-onload-event-triggered-using-esri-arcgis/m-p/253520#M23455</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You can check to see if the map's been loaded if it has just add the resize code. If it hasn't then hook up the event:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt; &amp;nbsp;&amp;nbsp; if (map.loaded) { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.initUI(); &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } else { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dojo.connect(map, "onLoad", function () { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.initUI(); &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }); &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Nov 2012 19:10:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/when-is-onload-event-triggered-using-esri-arcgis/m-p/253520#M23455</guid>
      <dc:creator>KellyHutchins</dc:creator>
      <dc:date>2012-11-20T19:10:01Z</dc:date>
    </item>
    <item>
      <title>Re: When is onLoad event triggered using esri.arcgis.utils.createMap?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/when-is-onload-event-triggered-using-esri-arcgis/m-p/253521#M23456</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;That's exactly what I needed to do. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you, Kelly!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;jtm&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Nov 2012 19:38:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/when-is-onload-event-triggered-using-esri-arcgis/m-p/253521#M23456</guid>
      <dc:creator>JoanneMcGraw</dc:creator>
      <dc:date>2012-11-20T19:38:49Z</dc:date>
    </item>
  </channel>
</rss>

