<?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: 2.8 to 3.1 breaks my site? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/2-8-to-3-1-breaks-my-site/m-p/572925#M53530</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Basically, do not reference anything in the esri namespace until all modules are loaded. Which means waiting dojo.addOnLoad or dojo.ready to fire.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 07 Aug 2012 21:19:04 GMT</pubDate>
    <dc:creator>derekswingley1</dc:creator>
    <dc:date>2012-08-07T21:19:04Z</dc:date>
    <item>
      <title>2.8 to 3.1 breaks my site?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/2-8-to-3-1-breaks-my-site/m-p/572923#M53528</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Just switched from the v2.8 api to v3.1 and I'm now getting lots of "Uncaught Reference Error: esri is not defined" errors. What happened to the esri object?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Steve G&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;County of SLO&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Aug 2012 18:00:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/2-8-to-3-1-breaks-my-site/m-p/572923#M53528</guid>
      <dc:creator>StevenGriffith</dc:creator>
      <dc:date>2012-08-07T18:00:18Z</dc:date>
    </item>
    <item>
      <title>Re: 2.8 to 3.1 breaks my site?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/2-8-to-3-1-breaks-my-site/m-p/572924#M53529</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Because of some changes in Dojo 1.7, (used in our Javascript API version 3.x) it is now possible that code outside an initialization function which instantiate classes can fire before the supporting modules are available.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can still use global variables, but if you are instantiating classes immediately, try moving the code inside init (or similar)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;var queryTask;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; function init() {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //build query
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; queryTask = new esri.tasks.QueryTask("http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/5");
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //dojo.connect(queryTask, "onComplete", showResults);&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;instead of&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
var queryTask;
queryTask = new esri.tasks.QueryTask("http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/5");
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; function init() {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //build query
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dojo.connect(queryTask, "onComplete", showResults);&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 00:39:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/2-8-to-3-1-breaks-my-site/m-p/572924#M53529</guid>
      <dc:creator>JohnGravois</dc:creator>
      <dc:date>2021-12-12T00:39:56Z</dc:date>
    </item>
    <item>
      <title>Re: 2.8 to 3.1 breaks my site?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/2-8-to-3-1-breaks-my-site/m-p/572925#M53530</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Basically, do not reference anything in the esri namespace until all modules are loaded. Which means waiting dojo.addOnLoad or dojo.ready to fire.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Aug 2012 21:19:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/2-8-to-3-1-breaks-my-site/m-p/572925#M53530</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2012-08-07T21:19:04Z</dc:date>
    </item>
    <item>
      <title>Re: 2.8 to 3.1 breaks my site?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/2-8-to-3-1-breaks-my-site/m-p/572926#M53531</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Basically, do not reference anything in the esri namespace until all modules are loaded. Which means waiting dojo.addOnLoad or dojo.ready to fire.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi Derek,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How would we handle this in the case of a custom module which internally references the esri namespace?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;An example is on the &lt;/SPAN&gt;&lt;A href="http://tmappsevents.esri.com/website/Public-Information-Map/src/index.html" rel="nofollow noopener noreferrer" target="_blank"&gt;Public Information Map&lt;/A&gt;&lt;SPAN&gt;, which includes the heatlayer module in the index.html page:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&lt;SPAN style="font-family:monospace;"&gt;&amp;lt;script type="text/javascript" src="&lt;A href="http://tmappsevents.esri.com/website/Public-Information-Map/src/js/heatlayer.js" rel="nofollow noopener noreferrer" target="_blank"&gt;js/heatlayer.js&lt;/A&gt;"&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="font-family:monospace;"&gt;&amp;lt;/script&amp;gt;
&lt;/SPAN&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This contains a reference to the esri namespace:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&lt;SPAN style="color:#000000;"&gt;dojo.declare("HeatmapLayer", [esri.layers.DynamicMapServiceLayer], {&lt;/SPAN&gt;
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What's the best way to migrate an application like this to 3.1?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Steve&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 00:39:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/2-8-to-3-1-breaks-my-site/m-p/572926#M53531</guid>
      <dc:creator>StephenLead</dc:creator>
      <dc:date>2021-12-12T00:39:58Z</dc:date>
    </item>
    <item>
      <title>Re: 2.8 to 3.1 breaks my site?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/2-8-to-3-1-breaks-my-site/m-p/572927#M53532</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Over at &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jshelp/inside_dojoversion.html"&gt;http://help.arcgis.com/en/webapi/javascript/arcgis/help/jshelp/inside_dojoversion.html&lt;/A&gt;&lt;SPAN&gt;, it explains that from 3.0 onward, the option to rename the namespace is no longer available.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So what are my options if I need 3.0 or later of the ArcGIS API, but have a conflict between 1.7 and another version of Dojo that is used on the application where my GIS app is embedded?&amp;nbsp; Do I have any options?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Sep 2012 22:49:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/2-8-to-3-1-breaks-my-site/m-p/572927#M53532</guid>
      <dc:creator>AndyStewart1</dc:creator>
      <dc:date>2012-09-11T22:49:41Z</dc:date>
    </item>
    <item>
      <title>Re: 2.8 to 3.1 breaks my site?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/2-8-to-3-1-breaks-my-site/m-p/572928#M53533</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It looks like scopemap won't work anymore, but according to Dojo docs you should be able to load custom namespaces for different dojo libraries to work with packages you define. Granted, I have not tried this, but could be worth investigating if you need to maintain some legacy compatibility.&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://dojotoolkit.org/reference-guide/1.7/loader/amd.html#relocating-module-namespaces"&gt;http://dojotoolkit.org/reference-guide/1.7/loader/amd.html#relocating-module-namespaces&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Sep 2012 13:25:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/2-8-to-3-1-breaks-my-site/m-p/572928#M53533</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2012-09-12T13:25:39Z</dc:date>
    </item>
    <item>
      <title>Re: 2.8 to 3.1 breaks my site?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/2-8-to-3-1-breaks-my-site/m-p/572929#M53534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;BR /&gt;How would we handle this in the case of a custom module which internally references the esri namespace?&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I didn't see this when it was initially posted... The way to handle this is to not include Dojo modules via a script tage and instead use dojoConfig to tell the loader where to find the module. The &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples/layers_point_clustering.html"&gt;point clustering sample&lt;/A&gt;&lt;SPAN&gt; shows how to use dojoConfig.packages to point to the location of a custom module.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Sep 2012 13:30:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/2-8-to-3-1-breaks-my-site/m-p/572929#M53534</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2012-09-12T13:30:18Z</dc:date>
    </item>
    <item>
      <title>Re: 2.8 to 3.1 breaks my site?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/2-8-to-3-1-breaks-my-site/m-p/572930#M53535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;It looks like scopemap won't work anymore, but according to Dojo docs you should be able to load custom namespaces for different dojo libraries to work with packages you define. Granted, I have not tried this, but could be worth investigating if you need to maintain some legacy compatibility.&lt;BR /&gt;&lt;A href="http://dojotoolkit.org/reference-guide/1.7/loader/amd.html#relocating-module-namespaces"&gt;http://dojotoolkit.org/reference-guide/1.7/loader/amd.html#relocating-module-namespaces&lt;/A&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;We tried this approach but were unsuccessful on first attempt.&amp;nbsp; Will have to try again.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Our issue is we have an GIS solution that is a third party app embedded in a customer's J2EE application. The customer's app runs a version of Dojo earlier than 1.7. But we need the ESRI Javascript API 3.0, but that version of Dojo conflicts with our customer's app in some specific ways.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there no version of the ArcGIS JavaScript API that we could download that doesn't include Dojo?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Sep 2012 16:56:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/2-8-to-3-1-breaks-my-site/m-p/572930#M53535</guid>
      <dc:creator>AndyStewart1</dc:creator>
      <dc:date>2012-09-12T16:56:21Z</dc:date>
    </item>
  </channel>
</rss>

