<?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: How to use require js Sugar Syntax with ESRI JSAPI in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-use-require-js-sugar-syntax-with-esri-jsapi/m-p/596313#M55897</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dojo doesn't yet support this. Right now, it needs to be&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #303030; font-family: arial, helvetica, sans-serif; font-size: 10pt;"&gt;&lt;CODE class="javascript" style="color: #333333;"&gt;define(&lt;SPAN class="function" style="font-style: inherit;"&gt;&lt;SPAN class="keyword" style="font-style: inherit;"&gt;function&lt;/SPAN&gt; &lt;SPAN class="params" style="font-style: inherit;"&gt;(require)&lt;/SPAN&gt; {&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp; require([&lt;SPAN class="string" style="font-style: inherit;"&gt;'esri/map'], function(Map) {&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #303030; font-family: arial, helvetica, sans-serif; font-size: 10pt;"&gt;&lt;SPAN class="string" style="font-style: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;CODE class="javascript" style="color: #333333;"&gt;&amp;nbsp; &lt;/CODE&gt;&lt;CODE class="javascript" style="color: #303030;"&gt;//do something with map&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #303030; font-family: arial, helvetica, sans-serif; font-size: 10pt;"&gt;&lt;CODE class="javascript" style="color: #333333;"&gt;&lt;SPAN class="string" style="font-style: inherit;"&gt;&amp;nbsp; }&lt;/SPAN&gt;);&lt;/CODE&gt;&lt;CODE class="javascript"&gt;&lt;BR /&gt;&lt;SPAN style="font-style: inherit;"&gt;});&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #303030; font-family: inherit; font-style: inherit;"&gt;This lazy loads the map. That being said, I did see some discussion at one point not long ago in Dojo IRC that this would be implemented, but I think it's going to be in Dojo2 as I don't see commit history for it in Dojo 1.x. As of right now, this only works if you have previously already loaded the module asynchronously somewhere else in your application.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 24 Aug 2015 22:25:06 GMT</pubDate>
    <dc:creator>ReneRubalcava</dc:creator>
    <dc:date>2015-08-24T22:25:06Z</dc:date>
    <item>
      <title>How to use require js Sugar Syntax with ESRI JSAPI</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-use-require-js-sugar-syntax-with-esri-jsapi/m-p/596312#M55896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'd like to use the Require.js Sugar Syntax for loading JSAPI modules, i.e.:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE class="javascript" style="color: #333333;"&gt;define(&lt;SPAN class="function"&gt;&lt;SPAN class="keyword" style="font-weight: bold; color: #006699;"&gt;function&lt;/SPAN&gt; &lt;SPAN class="params"&gt;(require)&lt;/SPAN&gt; {&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword" style="font-weight: bold; color: #006699;"&gt;var&lt;/SPAN&gt; map= require(&lt;SPAN class="string" style="color: #cc3300;"&gt;'esri/map'&lt;/SPAN&gt;),&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/CODE&gt;&lt;CODE class="javascript"&gt;&lt;SPAN style="color: #006699;"&gt;&lt;STRONG&gt;//do something with map&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #333333;"&gt;});&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333;"&gt;but when I try to instantiate a new Map object, an error is thrown that says "undefinedModule".&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333;"&gt;How can we make this work?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Brian Behling&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Aug 2015 21:53:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-use-require-js-sugar-syntax-with-esri-jsapi/m-p/596312#M55896</guid>
      <dc:creator>BrianBehling</dc:creator>
      <dc:date>2015-08-24T21:53:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to use require js Sugar Syntax with ESRI JSAPI</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-use-require-js-sugar-syntax-with-esri-jsapi/m-p/596313#M55897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dojo doesn't yet support this. Right now, it needs to be&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #303030; font-family: arial, helvetica, sans-serif; font-size: 10pt;"&gt;&lt;CODE class="javascript" style="color: #333333;"&gt;define(&lt;SPAN class="function" style="font-style: inherit;"&gt;&lt;SPAN class="keyword" style="font-style: inherit;"&gt;function&lt;/SPAN&gt; &lt;SPAN class="params" style="font-style: inherit;"&gt;(require)&lt;/SPAN&gt; {&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp; require([&lt;SPAN class="string" style="font-style: inherit;"&gt;'esri/map'], function(Map) {&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #303030; font-family: arial, helvetica, sans-serif; font-size: 10pt;"&gt;&lt;SPAN class="string" style="font-style: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;CODE class="javascript" style="color: #333333;"&gt;&amp;nbsp; &lt;/CODE&gt;&lt;CODE class="javascript" style="color: #303030;"&gt;//do something with map&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #303030; font-family: arial, helvetica, sans-serif; font-size: 10pt;"&gt;&lt;CODE class="javascript" style="color: #333333;"&gt;&lt;SPAN class="string" style="font-style: inherit;"&gt;&amp;nbsp; }&lt;/SPAN&gt;);&lt;/CODE&gt;&lt;CODE class="javascript"&gt;&lt;BR /&gt;&lt;SPAN style="font-style: inherit;"&gt;});&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #303030; font-family: inherit; font-style: inherit;"&gt;This lazy loads the map. That being said, I did see some discussion at one point not long ago in Dojo IRC that this would be implemented, but I think it's going to be in Dojo2 as I don't see commit history for it in Dojo 1.x. As of right now, this only works if you have previously already loaded the module asynchronously somewhere else in your application.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Aug 2015 22:25:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-use-require-js-sugar-syntax-with-esri-jsapi/m-p/596313#M55897</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2015-08-24T22:25:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to use require js Sugar Syntax with ESRI JSAPI</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-use-require-js-sugar-syntax-with-esri-jsapi/m-p/596314#M55898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's disappointing. It would be nice to use the sugar syntax when you have to load many ESRI modules. It gets quite messy using the standard syntax.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe in JSAPI 4.0, ESRI will just use require.js and drop the Dojo loaders? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Aug 2015 22:34:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-use-require-js-sugar-syntax-with-esri-jsapi/m-p/596314#M55898</guid>
      <dc:creator>BrianBehling</dc:creator>
      <dc:date>2015-08-24T22:34:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to use require js Sugar Syntax with ESRI JSAPI</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-use-require-js-sugar-syntax-with-esri-jsapi/m-p/596315#M55899</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There will be some stuff coming up soon that will allow expanded RequireJS support. Dojo is not going anywhere, but the ability to use RequireJS loader will be easier. RequireJS has some limitations when it comes to cross-domain loading of files that Dojo can handle.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Aug 2015 22:51:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-use-require-js-sugar-syntax-with-esri-jsapi/m-p/596315#M55899</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2015-08-24T22:51:32Z</dc:date>
    </item>
  </channel>
</rss>

