<?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 converting 2.8 to 3.7 in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/converting-2-8-to-3-7/m-p/687071#M63955</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello All,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm trying to convert an application w/ custom modules from 2.8 to 3.7.&amp;nbsp; I'd hoped to phase in this transition to AMD and tried initially simply replacing the references to 2.8 to those using 3.7. Unfortunately, this doesn't seem to work w/ complaints about missing jsapi_en-us.js, "define is not defined", etc.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'd understood that the the 3.7 was backward compatible w/ non-AMD code - can someone please help me?&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;--john&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 27 Sep 2013 16:58:25 GMT</pubDate>
    <dc:creator>JohnCartwright</dc:creator>
    <dc:date>2013-09-27T16:58:25Z</dc:date>
    <item>
      <title>converting 2.8 to 3.7</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/converting-2-8-to-3-7/m-p/687071#M63955</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello All,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm trying to convert an application w/ custom modules from 2.8 to 3.7.&amp;nbsp; I'd hoped to phase in this transition to AMD and tried initially simply replacing the references to 2.8 to those using 3.7. Unfortunately, this doesn't seem to work w/ complaints about missing jsapi_en-us.js, "define is not defined", etc.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'd understood that the the 3.7 was backward compatible w/ non-AMD code - can someone please help me?&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;--john&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Sep 2013 16:58:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/converting-2-8-to-3-7/m-p/687071#M63955</guid>
      <dc:creator>JohnCartwright</dc:creator>
      <dc:date>2013-09-27T16:58:25Z</dc:date>
    </item>
    <item>
      <title>Re: converting 2.8 to 3.7</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/converting-2-8-to-3-7/m-p/687072#M63956</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm still trying to avoid the migration to AMD myself but I think you might need to focus on the API versions 3.4, 3.5, or 3.6. A good place to start is the "What's New" section of the Concepts site (&lt;/SPAN&gt;&lt;A href="https://developers.arcgis.com/en/javascript/jshelp/new_v34.html" rel="nofollow noopener noreferrer" target="_blank"&gt;link&lt;/A&gt;&lt;SPAN&gt; for the What's New for v3.4).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't know about the custom module side of things but a few gotchas to pay attention to when moving from 2.8 to the 3.x series of APIs:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1. djConfig in your HTML header changes to dojoConfig&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. Remove any "lang=EN" from your &amp;lt;HTML&amp;gt; tag! For some darn reason, this breaks your app so, if you have it, remove it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3. Any code that references the esri namespace can't run until after all the modules have loaded. In the 2.8 days, I might have a global variable for the initial extent declared outside of my initMap function like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;var initExtent = new esri.geometry.Extent({
&amp;nbsp;&amp;nbsp; "xmin": -13592500,
&amp;nbsp;&amp;nbsp; "ymin": 6060280,
&amp;nbsp;&amp;nbsp; "xmax": -13506825,
&amp;nbsp;&amp;nbsp; "ymax": 6166129,
&amp;nbsp;&amp;nbsp; "spatialReference": {"wkid": 3857}
 });&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;This chokes in the 3.x APIs because of the esri.* reference. The solution is like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;var initExtent;

function initMap() {
 initExtent = new esri.geometry.Extent({
&amp;nbsp;&amp;nbsp; "xmin": -13592500,
&amp;nbsp;&amp;nbsp; "ymin": 6060280,
&amp;nbsp;&amp;nbsp; "xmax": -13506825,
&amp;nbsp;&amp;nbsp; "ymax": 6166129,
&amp;nbsp;&amp;nbsp; "spatialReference": {"wkid": 3857}
 });
}

dojo.Ready(initMap);&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I now also use dojo.Ready() instead of dojo.OnLoad() to call the map setup function at page load. I think these are the biggest issues in general when updating from v2.8. Hopefully someone else can provide some wisdom about your situation with the custom modules.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Good luck!&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 04:54:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/converting-2-8-to-3-7/m-p/687072#M63956</guid>
      <dc:creator>SteveCole</dc:creator>
      <dc:date>2021-12-12T04:54:20Z</dc:date>
    </item>
  </channel>
</rss>

