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

Styling in tiles viewer may not work for multi geometries (if using maplibre-gl 5) #511

Open
prusswan opened this issue Jan 8, 2025 · 5 comments

Comments

@prusswan
Copy link

prusswan commented Jan 8, 2025

I was using the tile viewer styling, only to realize that multi geometries were not showing up properly.

Turns out this was due to a breaking change in maplibre-gl v5:

- "filter": ["==", ["geometry-type"], "Polygon"]
+ "filter": ["==", "$type", "Polygon"]
@wipfli
Copy link
Contributor

wipfli commented Jan 8, 2025

Hi @prusswan. If you are referring to the protomaps basemap, this was fixed in the protomaps basemaps style here: protomaps/basemaps#341

@prusswan
Copy link
Author

prusswan commented Jan 8, 2025

Hi @prusswan. If you are referring to the protomaps basemap, this was fixed in the protomaps basemaps style here: protomaps/basemaps#341

Yeah, this is for the tooling at pmtiles.io (still using maplibre-gl v3), took me a while to realize why this is caused by v5.

@wipfli
Copy link
Contributor

wipfli commented Jan 8, 2025

Ah OK but then I don't understand the issue. Can you share some reproduction steps?

@prusswan
Copy link
Author

prusswan commented Jan 9, 2025

Ah OK but then I don't understand the issue. Can you share some reproduction steps?

It is not happening "yet", but when the version is upgraded:

"maplibre-gl": "3.3.1",

@bdon
Copy link
Member

bdon commented Jan 9, 2025

We should only need to change these geometry-type checks to use $type:

https://github.com/protomaps/PMTiles/blob/main/app/src/MaplibreMap.tsx#L271

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

3 participants