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

Interactive filtering within a layer (or more generally, greater maplibre support?) #716

Open
cboettig opened this issue Apr 12, 2024 · 2 comments
Labels
Feature Request New feature or request

Comments

@cboettig
Copy link

When using pmtiles, we can already do some cool things that maplibre supports, such as mapping data to aesthetics (e.g. #708). One option that looks very compelling within maplibre is this support for interactive filtering within a layer, as illustrated in this example: https://maplibre.org/maplibre-gl-js/docs/examples/filter-within-layer/ (see link for interactive version)

image

Would it be possible to implement this?

Relatedly, it would be nice to be able to do maplibre styling for other vector formats too. i.e. most maplibre examples focus on geojson anyway, and it makes sense that we plot and style vectors without worrying about whether those vectors are serialized as geojson, or pmtiles (or even shapefiles or geopandas). It looks like currently add_geojson() cannot map fill color to a data layer, e.g. we can't do "fill-color": ["get", "color_column"] with geojson, even though we can do that with pmtiles.

@cboettig cboettig added the Feature Request New feature or request label Apr 12, 2024
@cboettig
Copy link
Author

(maybe py-maplibregl is relevant/helpful here? e.g. https://eodagmbh.github.io/py-maplibregl/api/map/#maplibre.Map.set_filter)

@giswqs
Copy link
Member

giswqs commented Apr 14, 2024

Unfortunately, interactive filtering is probably not feasible with folium-pmtiles. I just looked into py-maplibregl. It seems exciting. I am going to add it as a new mapping backend for leafmap. That should provide better support for maplibre styling than folium-pmtiles. #718

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants