dojo.require("esri.geometry.Multipoint")
Description
(Added at v1.0)
An ordered collection of points.
Samples
Search for
samples that use this class.
Class hierarchy
esri/geometry.Geometry
|_esri/geometry.Multipoint
Constructors
Properties
Methods
Constructor Details
Creates a new Multipoint object.
Sample:
var multiPoint = new esri.geometry.Multipoint(new esri.SpatialReference({ wkid:4326 }));
Creates a new Multipoint object using a JSON object.
Parameters:
<Object > json |
Required |
JSON object representing the geometry. |
Sample:
var mpJson ={"points":[[-122.63,45.51],[-122.56,45.51],[-122.56,45.55]],"spatialReference":({" wkid":4326 })};
var multipoint = new esri.geometry.Multipoint(mpJson);
Property Details
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
An array of one or more points.
Sample:
var mp = new esri.geometry.Multipoint(new esri.SpatialReference({wkid:4326}));
mp.points = [[-122.63,45.51],[-122.56,45.51],[-122.56,45.55],[-122.62,45.],[-122.59,45.53]];
The type of geometry.
Known values: point
| multipoint
| polyline
| polygon
| extent
Method Details
Adds a point to the Multipoint. The point can be one of the following: an Esri Point, a number array, or a JSON object.
Parameters:
<Point | Number[] > point |
Required |
The point to add. The point is either an Point or an array of numbers representing the x,y coordinates. |
Sample: Point example:
multipoint.addPoint(new esri.geometry.Point(-122.63,45.51));
JSON example:
multipoint.addPoint({"x": -122.65, "y": 45.53 });
Sets the cache property to undefined
. (Added at v3.13)
Returns the value for a named property stored in the cache. (Added at v3.13)
Parameters:
<String > name |
Required |
The property name of the value to retrieve from the cache. |
Gets the extent of all the points. If only one point is present, the extent has a width and height of 0.
Returns the point at the specified index. (Added at v2.0)
Parameters:
<Number > index |
Required |
Positional index of the point in the points property. |
Removes a point from the Multipoint. The index specifies which point to remove.
Parameters:
<Number > index |
Required |
The index of the point to remove. |
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. |
Updates the point at the specified index. (Added at v2.0)
Parameters:
<Number > index |
Required |
Positional index of the point in the points property. |
<Point > point |
Required |
Point that specifies the new location. |
Sets the spatial reference.