AnsweredAssumed Answered

how to require graphicsUtils in v3

Question asked by huttarl on May 19, 2014
Latest reply on Oct 23, 2015 by bwscim
I'd been using esri.graphicsExtent() back in API v1.5 or so.
I'm now migrating to JS API v3 (with ArcGIS 10.1 on the server side).

My code that uses esri.graphicsExtent() no longer works, but I see from that the graphicsExtent() function is now under the esri/graphicsUtils namespace. The example there shows the use of

require([   "esri/graphicsUtils", ...  ], function(graphicsUtils, ... ) {   var myFeatureExtent = graphicsUtils.graphicsExtent(myFeatureSet.features);   ... });

But when I try following that pattern, I get the error

   NetworkError: 404 Not Found -

in my javascript console.

I've also tried
, but it doesn't work either.

My JS API script loading tag looks like this:
<script type="text/javascript" src=""></script>

What do I need to do to successfully load the graphicsUtils namespace?
Thanks for any suggestions.

P.S. my "require()" code is inside a function that's not called until a particular UI feature is used.
Could it be important that the require() code be outside of any functions, at the outer script level?
Currently, at that level I have a series of dojo.require() statements like

dojo.require("esri.tasks.query"); dojo.require("esri.tasks.identify");

Adding dojo.require("esri.graphicsUtils"); there doesn't work.
Nor does dojo.require("esri/graphicsUtils");

Either way, I get a 404 Not Found on

P.P.S. Did something about this namespace change between 3.0 and 3.9? The viewshed sample ( seems to use this module successfully.