Hide Table of Contents
esri/dijit/util
esri/layer/pixelFilters
esri/process
esri/support
esri/workers
Class: Geometry

dojo.require("esri.geometry");

Description

(Added at v1.0)
The base class for geometry objects. This class has no constructor. At version 3.3, all geometry objects will be assigned a default spatial reference of 4326 if one is not explicitly provided in the constructor.

Samples

Search for samples that use this class.

Subclasses

Properties

NameTypeSummary
cacheObjectThe cache is used to store values computed from geometries that need to cleared or recomputed upon mutation.
spatialReferenceSpatialReferenceThe spatial reference of the geometry.
typeStringThe type of geometry.

Methods

NameReturn typeSummary
clearCache()NoneSets the cache property to undefined.
getCacheValue(name)ObjectReturns the value for a named property stored in the cache.
setCacheValue(name, value)NoneSets the value for a named property stored in the cache.
setSpatialReference(sr)GeometrySets the spatial reference.
toJson()ObjectConverts object to its ArcGIS Server JSON representation.
Property Details

<Object> cache

The cache is used to store values computed from geometries that need to cleared or recomputed upon mutation. An example is the extent of a polygon. The default value is undefined. (Added at v3.13)
Default value: undefined

<SpatialReference> spatialReference

The spatial reference of the geometry. See Projected Coordinate Systems and Geographic Coordinate Systems for the list of supported spatial references.

<String> type

The type of geometry.
Known values: point | multipoint | polyline | polygon | extent
Method Details

clearCache()

Sets the cache property to undefined. (Added at v3.13)

getCacheValue(name)

Returns the value for a named property stored in the cache. (Added at v3.13)
Return type: Object
Parameters:
<String> name Required The property name of the value to retrieve from the cache.

setCacheValue(name, value)

Sets the value for a named property stored in the cache. (Added at v3.13)
Parameters:
<String> name Required The property name for the value Object to store in the cache.
<Object> value Required The value Object for a named property to store in the cache.

setSpatialReference(sr)

Sets the spatial reference.
Return type: Geometry
Parameters:
<SpatialReference> sr Required Spatial reference of the geometry.

toJson()

Converts object to its ArcGIS Server JSON representation.
Return type: Object
Show Modal