Layer filters
Understanding filter sources
const filters = await felt.getLayerFilters("layer-1");
console.log(filters.style); // Base filters from the layer style
console.log(filters.components); // Filters from legend components
console.log(filters.ephemeral); // Filters set through the SDK
console.log(filters.combined); // The final result of combining all filtersSetting filters
felt.setLayerFilters({
layerId: "layer-1",
filters: ["POPULATION", "gt", 1000000]
});Filter operators
Compound filters
Practical example: Filtering by selected feature
Best practices
Last updated
Was this helpful?