How to use the @mapbox/mapbox-gl-style-spec.featureFilter function in @mapbox/mapbox-gl-style-spec

To help you get started, we’ve selected a few @mapbox/mapbox-gl-style-spec examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github openlayers / ol-mapbox-style / stylefunction.js View on Github external
function evaluateFilter(layerId, filter, feature, zoom) {
  if (!(layerId in filterCache)) {
    filterCache[layerId] = createFilter(filter);
  }
  zoomObj.zoom = zoom;
  return filterCache[layerId](zoomObj, feature);
}
github iTowns / itowns / src / Parser / VectorTileParser.js View on Github external
allLayers.forEach((l) => {
            l.filterExpression = featureFilter(l.filter);
        });
        features.filter.loaded = true;