JS API
Map Object
QueryEngine Object
Layer Object
Feature Object
Query Object
GeoJson Function Library (Experimental)

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

var qry = new Mapzania.QueryEngine();

qry.usingLayerSource("COUNTRIES")
  .filterByBoundingBox([12.4, 9.5, 24.6, 41.2])
  .apply()
  .then(function(data){
        console.log(data);
   });