Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dynamic filter to GeoJSON source #304

Open
KaiHuebner opened this issue Aug 25, 2020 · 0 comments
Open

Add dynamic filter to GeoJSON source #304

KaiHuebner opened this issue Aug 25, 2020 · 0 comments

Comments

@KaiHuebner
Copy link

Is your feature request related to a problem? Please describe.

I'm using clustering on a GeoJSON source. Until recently it was very hard to filter a cluster layer.
But now Mapbox included filtering the source before clustering:

Right now I can filter the GeoJSON source on the initial load, like:
<Source id='points' type='geojson' data={data} filter={['==', 'foo', 'bar']} />

Describe the solution you'd like

Is there a way to make the filter dynamic?
I need to change the filter all the time. Not only when the source is initialized.
Can it be included in the filter component? Like:
<Filter sourceId='points' filter={['==', 'foo', 'bar']} />

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant