- 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 Geospatial Operators

### intersection

Finds the GeoJSON geometry that makes up the intersection of two other geometries.

#### Parameters

Name | Required | Description |
---|---|---|

geometry1 | Yes | Any GeoJSON geometry object. |

geometry2 | Yes | Any GeoJSON geometry object. |

#### Currently Implemented

At present this function is only implemented for the geometry types in the table below.

Point | MultiPoint | LineString | MultiLineString | Polygon | MultiPolygon | BoundingBox | |
---|---|---|---|---|---|---|---|

geometry1 |
|||||||

Point | - | - | - | - | - | - | - |

MultiPoint | - | - | - | - | - | - | - |

LineString | - | - | YES | - | - | - | - |

MultiLineString | - | - | - | - | - | - | - |

Polygon | - | - | - | - | - | - | - |

MultiPolygon | - | - | - | - | - | - | - |

BoundingBox | - | - | - | - | - | - | - |

### intersects

Determines whether two GeoJSON geometries intersect as a boolean.

#### Parameters

Name | Required | Description |
---|---|---|

geometry1 | Yes | Any GeoJSON geometry object. |

geometry2 | Yes | Any GeoJSON geometry object. |

#### Currently Implemented

At present this function is only implemented for the geometry types in the table below.

Point | MultiPoint | LineString | MultiLineString | Polygon | MultiPolygon | BoundingBox | |
---|---|---|---|---|---|---|---|

geometry1 |
|||||||

Point | - | - | - | - | - | - | - |

MultiPoint | - | - | - | - | - | - | - |

LineString | - | - | YES | - | - | - | - |

MultiLineString | - | - | - | - | - | - | - |

Polygon | - | - | - | - | YES | - | - |

MultiPolygon | - | - | - | - | - | - | - |

BoundingBox | - | - | - | - | - | - | YES |

### isContainedBy

Determines whether a GeoJSON geometry is contained by another GeoJson geometry as a boolean.

#### Parameters

Name | Required | Description |
---|---|---|

geometry | Yes | Any GeoJSON geometry object. |

container | Yes | Any GeoJSON geometry object. |

#### Currently Implemented

At present this function is only implemented for the geometry types in the table below.

Point | MultiPoint | LineString | MultiLineString | Polygon | MultiPolygon | BoundingBox | |
---|---|---|---|---|---|---|---|

geometry |
|||||||

Point | - | - | YES(ring) | - | YES | - | YES |

MultiPoint | - | - | - | - | - | - | - |

LineString | - | - | YES(ring) | - | - | - | - |

MultiLineString | - | - | - | - | - | - | - |

Polygon | - | - | - | - | YES | - | - |

MultiPolygon | - | - | - | - | - | - | - |

BoundingBox | - | - | - | - | - | - | - |

### slice

Slices a GeoJSON geometry into multiple geometries based on intersections with other geometries.

NOTE: In the case of the Point geometry, the point will first snap to the other geometry before slicing.

#### Parameters

Name | Required | Description |
---|---|---|

geometry | Yes | Any GeoJSON geometry object. |

sliceBy | Yes | Any GeoJSON geometry object. |

#### Currently Implemented

At present this function is only implemented for the geometry types in the table below.

Point | MultiPoint | LineString | MultiLineString | Polygon | MultiPolygon | BoundingBox | |
---|---|---|---|---|---|---|---|

geometry |
|||||||

Point | - | - | - | - | - | - | - |

MultiPoint | - | - | - | - | - | - | - |

LineString | YES | - | - | - | - | - | - |

MultiLineString | - | - | - | - | - | - | - |

Polygon | - | - | - | - | - | - | - |

MultiPolygon | - | - | - | - | - | - | - |

BoundingBox | - | - | - | - | - | - | - |

### snapTo

Snaps a point onto another geometry.

#### Parameters

Name | Required | Description |
---|---|---|

point | Yes | Any GeoJSON Point object. |

geometry | Yes | Any GeoJSON geometry object. |

#### Currently Implemented

At present this function is only implemented for the geometry types in the table below.

Point | MultiPoint | LineString | MultiLineString | Polygon | MultiPolygon | BoundingBox | |
---|---|---|---|---|---|---|---|

Point | - | - | YES | YES | - | - | - |

### rotate

returns a rotated GeoJson geometry.

#### Parameters

Name | Required | Description |
---|---|---|

geometry | Yes | Any GeoJSON geometry object. |

origin | Yes | Any GeoJSON Point object around which to rotate the geometry |

angle | Yes | The andle in radians to rotate the geometry |