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
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.
sliceBy
Point | MultiPoint | LineString | MultiLineString | Polygon | MultiPolygon | BoundingBox | |
---|---|---|---|---|---|---|---|
geometry | |||||||
Point | - | - | - | - | - | - | - |
MultiPoint | - | - | - | - | - | - | - |
LineString | YES | - | - | - | - | - | - |
MultiLineString | - | - | - | - | - | - | - |
Polygon | - | - | - | - | - | - | - |
MultiPolygon | - | - | - | - | - | - | - |
BoundingBox | - | - | - | - | - | - | - |