Hide Table of Contents
esri/dijit/util
esri/layer/pixelFilters
esri/process
esri/support
esri/workers
Object: esri/graphicsUtils

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

NameReturn typeSummary
getGeometries(graphics)Geometry[]Converts an array of graphics to an array of geometries.
graphicsExtent(graphics)ExtentUtility function that returns the extent of an array of graphics.
Method Details

getGeometries(graphics)

Converts an array of graphics to an array of geometries. This is primarily used by GeometryService.
Return type: Geometry[]
Parameters:
<Graphic[]> graphics Required Array of graphics to convert to geometries
Sample:
geometries[0] = esri.getGeometries(baseGraphics);

graphicsExtent(graphics)

Utility function that returns the extent of an array of graphics.
Return type: Extent
Parameters:
<Graphic[]> graphics Required The input graphics array.
Sample:
var myFeatureExtent = esri.graphicsExtent(myFeatureSet.features);
Show Modal