# new MultiPoint(points)
Create a new MultiPoint geometry.
Parameters:
Name | Type | Description |
---|---|---|
points |
Array.<Location> | Array of Location objects. |
- Tutorials:
-
- Tutorial: geometries-multiPoint
If no points are provided.
Example
Create a simple MultiPoint
const multiPoint = new Vexcel.Geometry.MultiPoint([
new Vexcel.Geometry.Location(35.585851593232356, -116.136474609375),
new Vexcel.Geometry.Location(35.15584570226544, -117.39990234375),
new Vexcel.Geometry.Location(35.02999636902566, -115.631103515625),
new Vexcel.Geometry.Location(35.585851593232356, -116.136474609375),
]);
Classes
Methods
# clone() → (non-null) {MultiPoint}
Create a deep copy of this MultiPoint geometry.
A cloned MultiPoint instance.
# getArea() → {number}
Get the area of the MultiPoint on the projected plane.
Area in map units.
# getLocations() → {Array.<Location>}
Get the locations that define the MultiPoint.
Array of Location objects with latitude and longitude.
# setLocations(points)
Update the MultiPoint with new locations.
Parameters:
Name | Type | Description |
---|---|---|
points |
Array.<Location> | Array of Location objects. |
# toGeoJSON() → {string}
Convert geometry to GeoJSON string with xy coordinates [long, lat].
GeoJSON representation.
# toWKT() → {string}
Convert geometry to WKT string with xy coordinates [long, lat].
WKT representation.