JS API
- Parameters
- Options
- Example
- Methods
- fitToBoundingBox
- getBoundingBox
- getInitialBoundingBox
- getLayers
- getMouseMode
- off
- on
- once
- refresh
- reset
- setMouseMode
- usingLayer
- usingNewLayer
- Events
- Parameters
- Example
- Methods
- addFeature
- addFeatureCollection
- bringForwards
- bufferGeometry
- changeProperties
- clearFilters
- clearFeatures
- clearStyle
- clipByFeatureCollection
- convertToCentroids
- filterByBoundingBox
- filterByFeatureCollection
- filterByNearest
- filterByText
- getFeatureCollection
- hide
- sendBackwards
- show
- style
- update
- usingFeature
GeoJson Geometry Functions
getArea
Calculates the area of a GeoJSON geometry object as a numeric value.
Parameters
Name | Required | Description |
---|---|---|
geometry | Yes | Any GeoJSON Point, MultiPoint, LineString, MultiLineString, Polygon or MultiPolygon object. |
getCentroid
Calculates the centroid of a GeoJSON geometry object or BoundingBox as a GeoJSON Point.
Parameters
Name | Required | Description |
---|---|---|
geometry | Yes | Any GeoJSON Point, MultiPoint, LineString, MultiLineString, Polygon or MultiPolygon object or a BoundingBox array. |
getFeatureAt
Returns a GeoJSON feature at a given distance along a GeoJSON LineString or MultiLineString.
The properties of the feature also include the rotation angle of the LineString/MultiLineString at the given distance.
Parameters
Name | Required | Description |
---|---|---|
geometry | Yes | Any GeoJSON LineString or MultiLineString. |
distanceAlong | Yes | The distance along the GeoJSON LineString or MultiLineString at which to obtain the Feature. |
getLength
Calculates the length of a GeoJSON geometry object as a numeric value.
Parameters
Name | Required | Description |
---|---|---|
geometry | Yes | Any GeoJSON Point, MultiPoint, LineString, MultiLineString, Polygon or MultiPolygon object. |
getLongest
Returns the longest GeoJSON LineString in a GeoJSON MultiLine.
Parameters
Name | Required | Description |
---|---|---|
geometry | Yes | Any GeoJSON MultiLineString. |
getBoundingBox
Calculates the Bounding Box of a GeoJSON geometry object as a Bounding Box array.
Parameters
Name | Required | Description |
---|---|---|
geometry | Yes | Any GeoJSON Point, MultiPoint, LineString, MultiLineString, Polygon or MultiPolygon object. |