<?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 require graphicsUtils in v3 in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-require-graphicsutils-in-v3/m-p/609830#M57086</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I called ESRI tech support, and the knowledgeable analyst helped me discover the problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;UL&gt;&lt;BR /&gt;&lt;LI&gt;the API documentation I was using was the variant for AMD&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;AMD is only available for v3.4+, or thereabouts. Not in v3.0.&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;for non-AMD code, you use esri.graphicsExtent().&lt;/LI&gt;&lt;BR /&gt;&lt;/UL&gt;&lt;SPAN&gt;I tried using esri.graphicsExtent(), and it worked!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So ... what was my problem originally, that started all this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I really don't know why esri.graphicsExtent() didn't work before. Possibly because it was being used before the scripts had finished loading??&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 May 2014 20:41:10 GMT</pubDate>
    <dc:creator>LarsHuttar</dc:creator>
    <dc:date>2014-05-20T20:41:10Z</dc:date>
    <item>
      <title>how to require graphicsUtils in v3</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-require-graphicsutils-in-v3/m-p/609829#M57085</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'd been using esri.graphicsExtent() back in API v1.5 or so.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm now migrating to JS API v3 (with ArcGIS 10.1 on the server side).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My code that uses esri.graphicsExtent() no longer works, but I see from &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://developers.arcgis.com/javascript/jsapi/esri.graphicsutils-amd.html" rel="nofollow" target="_blank"&gt;https://developers.arcgis.com/javascript/jsapi/esri.graphicsutils-amd.html&lt;/A&gt;&lt;SPAN&gt; that the graphicsExtent() function is now under the esri/graphicsUtils namespace. The example there shows the use of &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;require([ &amp;nbsp; "esri/graphicsUtils", ...&amp;nbsp; ], function(graphicsUtils, ... ) { &amp;nbsp; var myFeatureExtent = graphicsUtils.graphicsExtent(myFeatureSet.features); &amp;nbsp; ... });&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But when I try following that pattern, I get the error&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; NetworkError: 404 Not Found - &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://js.arcgis.com/3.0/js/dojo/esri.graphicsUtils.js" rel="nofollow" target="_blank"&gt;https://js.arcgis.com/3.0/js/dojo/esri.graphicsUtils.js&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;in my javascript console.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've also tried &lt;/SPAN&gt;&lt;PRE class="plain" name="code"&gt;dojo.require("esri.graphicsUtils");&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;SPAN&gt;, but it doesn't work either.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My JS API script loading tag looks like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;lt;script type="text/javascript" src="https://js.arcgis.com/3.0/"&amp;gt;&amp;lt;/script&amp;gt;&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What do I need to do to successfully load the graphicsUtils namespace?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for any suggestions.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;P.S. my "require()" code is inside a function that's not called until a particular UI feature is used.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Could it be important that the require() code be outside of any functions, at the outer script level?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Currently, at that level I have a series of dojo.require() statements like&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;dojo.require("esri.tasks.query"); dojo.require("esri.tasks.identify");&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;SPAN&gt;Adding dojo.require("esri.graphicsUtils"); there doesn't work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Nor does dojo.require("esri/graphicsUtils"); &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Either way, I get a 404 Not Found on&lt;/SPAN&gt;&lt;BR /&gt;&lt;A class="jive-link-external-small" href="https://js.arcgis.com/3.0/js/esri/graphicsUtils.js" rel="nofollow" target="_blank"&gt;https://js.arcgis.com/3.0/js/esri/graphicsUtils.js&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;P.P.S. Did something about this namespace change between 3.0 and 3.9? The viewshed sample (&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://developers.arcgis.com/javascript/jssamples/gp_viewshed.html" rel="nofollow" target="_blank"&gt;https://developers.arcgis.com/javascript/jssamples/gp_viewshed.html&lt;/A&gt;&lt;SPAN&gt;) seems to use this module successfully.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 May 2014 19:34:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-require-graphicsutils-in-v3/m-p/609829#M57085</guid>
      <dc:creator>LarsHuttar</dc:creator>
      <dc:date>2014-05-19T19:34:50Z</dc:date>
    </item>
    <item>
      <title>Re: how to require graphicsUtils in v3</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-require-graphicsutils-in-v3/m-p/609830#M57086</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I called ESRI tech support, and the knowledgeable analyst helped me discover the problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;UL&gt;&lt;BR /&gt;&lt;LI&gt;the API documentation I was using was the variant for AMD&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;AMD is only available for v3.4+, or thereabouts. Not in v3.0.&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;for non-AMD code, you use esri.graphicsExtent().&lt;/LI&gt;&lt;BR /&gt;&lt;/UL&gt;&lt;SPAN&gt;I tried using esri.graphicsExtent(), and it worked!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So ... what was my problem originally, that started all this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I really don't know why esri.graphicsExtent() didn't work before. Possibly because it was being used before the scripts had finished loading??&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 May 2014 20:41:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-require-graphicsutils-in-v3/m-p/609830#M57086</guid>
      <dc:creator>LarsHuttar</dc:creator>
      <dc:date>2014-05-20T20:41:10Z</dc:date>
    </item>
    <item>
      <title>Re: how to require graphicsUtils in v3</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-require-graphicsutils-in-v3/m-p/609831#M57087</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Struggled with this too until I found your post!&amp;nbsp; Good stuff - the devils in the details and with all the documentation ESRI provides sometimes you end up on the wrong page.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks Lars...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Oct 2015 20:17:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-require-graphicsutils-in-v3/m-p/609831#M57087</guid>
      <dc:creator>BWSCIM</dc:creator>
      <dc:date>2015-10-23T20:17:26Z</dc:date>
    </item>
  </channel>
</rss>

