<?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: Problem with dojo in JavaScript? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problem-with-dojo-in-javascript/m-p/142270#M13270</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Looks like I got caught up in trying to figure out the error message, and forgot to change the spatial extent from a previous basemap I was using. (The basemap in my posted code was supposed to be on. I had turned it off temporarily trying to trouble shoot).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks to everyone for helping me figure out another rookie mistake.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 24 Aug 2011 13:56:06 GMT</pubDate>
    <dc:creator>BenReilly</dc:creator>
    <dc:date>2011-08-24T13:56:06Z</dc:date>
    <item>
      <title>Problem with dojo in JavaScript?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problem-with-dojo-in-javascript/m-p/142264#M13264</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Sorry I can't be more specific in the title. The other day, 2 of my JavaScript maps stopped working properly while a third kept working. The only thing the two that stopped working have in common is that they contain dojo elements. I brought up Firebug, and received this error when trying to load:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;TypeError: Unable to draw graphic (geometry:null, symbol:null): this._gc is null&lt;BR /&gt;[Break On This Error] if(!dojo._hasResource["dijit._base.man...h","tr","xx","zh","zh-cn","zh-tw"]);&lt;BR /&gt;arcgis?v=2.4 (line 48)&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Line 48 in my code is CSS- in ESRI's JavaScript document, at &lt;/SPAN&gt;&lt;A href="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.4"&gt;http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.4&lt;/A&gt;&lt;SPAN&gt;, it contains information about Dojo. Is this a known error, or did I screw something else up? Changing to version 2.3 through 2.1 did not fix my problem, either.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Aug 2011 19:47:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problem-with-dojo-in-javascript/m-p/142264#M13264</guid>
      <dc:creator>BenReilly</dc:creator>
      <dc:date>2011-08-22T19:47:15Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with dojo in JavaScript?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problem-with-dojo-in-javascript/m-p/142265#M13265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Can you post your code?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Aug 2011 22:16:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problem-with-dojo-in-javascript/m-p/142265#M13265</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2011-08-22T22:16:50Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with dojo in JavaScript?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problem-with-dojo-in-javascript/m-p/142266#M13266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;My code is attached.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Aug 2011 17:57:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problem-with-dojo-in-javascript/m-p/142266#M13266</guid>
      <dc:creator>BenReilly</dc:creator>
      <dc:date>2011-08-23T17:57:05Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with dojo in JavaScript?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problem-with-dojo-in-javascript/m-p/142267#M13267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I believe it is telling you that you cannot add those feature layers without a basemap.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Aug 2011 19:14:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problem-with-dojo-in-javascript/m-p/142267#M13267</guid>
      <dc:creator>JoeJeurissen</dc:creator>
      <dc:date>2011-08-23T19:14:24Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with dojo in JavaScript?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problem-with-dojo-in-javascript/m-p/142268#M13268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ben,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It's hard to test this exactly since we don't have access to your internal server, but here are some suggestions.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Define startExtent before assigning it to the map:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
 var spatialRef = new esri.SpatialReference({wkid:102100});
 var startExtent = new esri.geometry.Extent();
 startExtent.xmin = -9879338;
 startExtent.ymin = 5286787;
 startExtent.xmax = -9878257;
 startExtent.ymax = 5287623;
 startExtent.SpatialReference = spatialRef;

 map = new esri.Map("mapDiv",{extent:startExtent });
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Rather than calling:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;nbsp; dojo.addOnLoad(init);
&amp;nbsp; dojo.addOnLoad(initParking);
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;call initParking in the map's &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi/map.htm#onLayersAddResult" rel="nofollow noopener noreferrer" target="_blank"&gt;onLayersAddResult&lt;/A&gt;&lt;SPAN&gt; event:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
dojo.connect(map, "onLayersAddResult", initParking);
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does that make any difference?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Steve&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 07:50:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problem-with-dojo-in-javascript/m-p/142268#M13268</guid>
      <dc:creator>StephenLead</dc:creator>
      <dc:date>2021-12-11T07:50:23Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with dojo in JavaScript?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problem-with-dojo-in-javascript/m-p/142269#M13269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Adding a base map, creating the extent before referencing it in the map constructor and creating an extent with a spatial reference that matches the basemap's gets it working for me. Take a look at the attached, modified version of your code. No problems with dojo...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Aug 2011 22:54:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problem-with-dojo-in-javascript/m-p/142269#M13269</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2011-08-23T22:54:28Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with dojo in JavaScript?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problem-with-dojo-in-javascript/m-p/142270#M13270</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Looks like I got caught up in trying to figure out the error message, and forgot to change the spatial extent from a previous basemap I was using. (The basemap in my posted code was supposed to be on. I had turned it off temporarily trying to trouble shoot).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks to everyone for helping me figure out another rookie mistake.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Aug 2011 13:56:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problem-with-dojo-in-javascript/m-p/142270#M13270</guid>
      <dc:creator>BenReilly</dc:creator>
      <dc:date>2011-08-24T13:56:06Z</dc:date>
    </item>
  </channel>
</rss>

