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

clipByFeatureCollection

Creates an filter that clips features based on whether or not they are inside of a GeoJSON FeatureCollection.

Parameters

Name Required Description
featureCollection Yes A GeoJSON FeatureCollection.

Example

var featureCollection = {
  type:"FeatureCollection",
  features: [
    {
      type: "Feature",    
      geometry: {
        coordinates: [
          [
            [4.88922, 52.37072],
            [4.89526, 52.37114],
            [4.89209, 52.36931],
            [4.88925, 52.37072]
          ]
        ],
        type: "Polygon"
      }
    }
  ]
};

var qry = new Mapzania.QueryEngine();

qry.usingLayerSource("COUNTRIES")
  .clipByFeatureCollection(featureCollection)
  .apply()
  .then(function(data){
        console.log(data);
   });