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

simplify multi layer view #20

Open
kartenkarsten opened this issue Mar 15, 2015 · 1 comment
Open

simplify multi layer view #20

kartenkarsten opened this issue Mar 15, 2015 · 1 comment

Comments

@kartenkarsten
Copy link
Owner

It's quite common to show only features of a certian category selected by the user. Technical its possible to use one query for each category or maybe on for all and just show and hide some features by a certain tag.
(I would like to have such an example for fast adapting.)

What do you think is the best way to go?

@k-nut
Copy link
Contributor

k-nut commented Mar 18, 2015

I think this could possibly be solved by converting to use geojson as well. There is a filter function when adding geojson-layers that can be used to filter in advance.[1]

It does not enable live filtering though (only ahead of time), but there seem to be workarounds [2]

Or as a last option mapbox.js (which is built on top of leaflet) seems to be able to filter feaure layers (built from geojson) out of the box [3]

[1] http://leafletjs.com/examples/geojson.html
[2] http://stackoverflow.com/questions/16148598/leaflet-update-geojson-filter
[3] https://www.mapbox.com/mapbox.js/example/v1.0.0/filtering-markers/

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

No branches or pull requests

2 participants