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

Polygons incorrectly overlap when using terrain with 512px images #5459

Open
neodescis opened this issue Feb 4, 2025 · 4 comments
Open

Polygons incorrectly overlap when using terrain with 512px images #5459

neodescis opened this issue Feb 4, 2025 · 4 comments
Labels
bug Something isn't working PR is more than welcomed Extra attention is needed terrain

Comments

@neodescis
Copy link
Collaborator

neodescis commented Feb 4, 2025

It seems that MapLibre 5.x is rendering polygons (and possibly other things) incorrectly when using terrain tiles set to 512px. Note that the actual image size doesn't seem to matter; it's the size that is provided to MapLibre. In the jsbin below, this can be fixed by setting the tile size to 256px (even though the images are 512px), or reverting back to MapLibre 4.x.

I based the linked jsbin on the MapLibre terrain example. Interestingly, even though the tiles are 512px, the example's terrain is set to 256px. I'm not sure why that is.

I assume this was caused by the new globe functionality, but it does not require the globe projection to be enabled.

maplibre-gl-js version: 5.1.0

browser: Chrome 132

Steps to Trigger Behavior

  1. Add terrain with 512px images
  2. Add large polygon over the top that spans multiple tiles
  3. See weird overlap

Link to Demonstration

https://jsbin.com/nafuwibuxu/edit?html,output

Expected Behavior

Polygon should be rendered without overlap

Actual Behavior

Overlap around tile boundaries

@neodescis neodescis added bug Something isn't working globe Globe related issues terrain labels Feb 4, 2025
@neodescis
Copy link
Collaborator Author

Possibly related to #5380

@HarelM HarelM added the PR is more than welcomed Extra attention is needed label Feb 4, 2025
@HarelM
Copy link
Collaborator

HarelM commented Feb 4, 2025

The provided example and the description above doesn't mention the need for globe, should the globe tag be removed then?

@neodescis
Copy link
Collaborator Author

I added globe purely because I believe the globe changes caused this; we can remove the label if you like though!

@HarelM HarelM removed the globe Globe related issues label Feb 5, 2025
@neodescis
Copy link
Collaborator Author

After reading, this is possibly the same as this issue: #5084

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working PR is more than welcomed Extra attention is needed terrain
Projects
None yet
Development

No branches or pull requests

2 participants