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
filterByBoundingBox
Creates an filter that filters features based on a bounding box.
Parameters
Name | Required | Description |
---|---|---|
bbox | Yes | The bounding box by which features are filtered. The format of the bbox parameter is an array of numbers and conforms to the GeoJSON standard for a bounding box i.e. [minX, minY, maxX, maxY] where: - minX (The minimum x-value of the bounding box) - minY (The minimum y-value of the bounding box) - maxX (The maximum x-value of the bounding box) - maxY (The maximum y-value of the bounding box) |
Example
map.usingLayer("COUNTRIES")
.filterByBoundingBox([12.4, 9.5, 24.6, 41.2])
.update();