require(["esri/graphicsUtils"], function(graphicsUtils) { /* code goes here */ });
Description
(Added at v3.8)
Utility methods for working with graphics.
When coding legacy (non-AMD) style, there is no need to require the module. All methods and properties are available in the namespace. For example,
esri.getGeometries().
Samples
Search for
samples that use this class.
Methods
Method Details
Converts an array of graphics to an array of geometries. This is primarily used by
GeometryService.
Parameters:
<Graphic[]> graphics |
Required |
Array of graphics to convert to geometries |
Sample:
require([
"esri/graphicsUtils", ...
], function(graphicsUtils, ... ) {
geometries[0] = graphicsUtils.getGeometries(baseGraphics);
...
});
Utility function that returns the extent of an array of graphics.
Parameters:
<Graphic[]> graphics |
Required |
The input graphics array. |
Sample:
require([
"esri/graphicsUtils", ...
], function(graphicsUtils, ... ) {
var myFeatureExtent = graphicsUtils.graphicsExtent(myFeatureSet.features);
...
});