<?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 Custom Module Not Loading (dojo.ready issue???) in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/custom-module-not-loading-dojo-ready-issue/m-p/133668#M12439</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi All,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am trying to customise the Basic Viewer template from AGOL. One of the things I am trying to do is to load a custom module. However when I call the custom module I get an error message to say that it is 'undefined'. From doing a bit of research I see that the calls to custom modules need to be wrapped in a dojo.ready function but I am not sure where to put this in my code. To add a bit of detail to the post:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;With the Basic Viewer template the main thrust of UI and map creation is carried out within a separate template.js file. The call to these functions are already wrapped in a dojo.ready function within the index.html page (would this cause any issues if I put another dojo.ready function in the template.js file?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The code is attached, so far I have tried:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; - wrapping the createApp() function in a dojo.ready function, but it never gets called&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; - wrapping the addXYZoom() function in a dojo.ready function but again it never seems to get called&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can anyone suggest where this dojo.ready function should be placed, or if this is even the solution! &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Peter&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 10 Nov 2013 08:39:35 GMT</pubDate>
    <dc:creator>PeterMcBride</dc:creator>
    <dc:date>2013-11-10T08:39:35Z</dc:date>
    <item>
      <title>Custom Module Not Loading (dojo.ready issue???)</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/custom-module-not-loading-dojo-ready-issue/m-p/133668#M12439</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi All,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am trying to customise the Basic Viewer template from AGOL. One of the things I am trying to do is to load a custom module. However when I call the custom module I get an error message to say that it is 'undefined'. From doing a bit of research I see that the calls to custom modules need to be wrapped in a dojo.ready function but I am not sure where to put this in my code. To add a bit of detail to the post:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;With the Basic Viewer template the main thrust of UI and map creation is carried out within a separate template.js file. The call to these functions are already wrapped in a dojo.ready function within the index.html page (would this cause any issues if I put another dojo.ready function in the template.js file?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The code is attached, so far I have tried:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; - wrapping the createApp() function in a dojo.ready function, but it never gets called&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; - wrapping the addXYZoom() function in a dojo.ready function but again it never seems to get called&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can anyone suggest where this dojo.ready function should be placed, or if this is even the solution! &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Peter&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 10 Nov 2013 08:39:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/custom-module-not-loading-dojo-ready-issue/m-p/133668#M12439</guid>
      <dc:creator>PeterMcBride</dc:creator>
      <dc:date>2013-11-10T08:39:35Z</dc:date>
    </item>
  </channel>
</rss>

