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

Images in symbol features with placement other than "point" get scaled when moving the globe around the poles #5090

Open
JakubJagoda opened this issue Nov 21, 2024 · 3 comments
Labels
bug Something isn't working globe Globe related issues PR is more than welcomed Extra attention is needed

Comments

@JakubJagoda
Copy link

JakubJagoda commented Nov 21, 2024

maplibre-gl-js version: 5.0.0-pre.7
EDIT: I originally created this issue against version 5.0.0-pre.6, but then I noticed that 5.0.0-pre.7 was out, so checked against it as well and updated the description.

browser: Chrome 131.0.6778.85 (Official Build) (arm64) / Firefox 132.0b9 (aarch64)

Steps to Trigger Behavior

  1. Create map with globe projection
  2. Add a symbol layer rendering an image with symbol-placement set to value other than "point"
  3. Move the globe so that one of the poles is in the center

Link to Demonstration

https://codepen.io/kuba-jagoda-asi/pen/YzmojqQ

Expected Behavior

The rendered image should visually retain its size

Actual Behavior

The image gets scaled up way too much

Some more info

It seems that this was also enlarging texts, but has been fixed somewhere between 5.0.0-pre.1 and 5.0.0-pre.6 (if you change the version to 5.0.0-pre.1 in the pen and repeat the steps, you'll see that the text was also scaled. This doesn't happen on 5.0.0-pre.6). This + the fact that it doesn't happen in Mapbox (example for reference: https://codepen.io/kuba-jagoda-asi/pen/JjgQBJE?editors=1010) makes be believe that it's not intended, but rather a bug.
Changing layer's symbol-placement to point prevents this from happening. So does changing icon-pitch-alignment to "viewport". But both render the layer in a bit different way (the image is not "sticked" to the globe anymore, but rather faces the camera).
Here's some images to quickly show what I'm talking about:

Maplibre 5.0.0-pre.6 (notice the large gray trapezoid):
Image

Mapbox (the image remained non-scaled):
Image

Maplibre 5.0.0-pre.1 (where text also got scaled - but this was fixed):
Image

@HarelM
Copy link
Collaborator

HarelM commented Nov 21, 2024

I'm guessing you are referring to this issue, right?

Which was fixed by the following PR as part of pre.5

CC: @kubapelc

@HarelM HarelM added bug Something isn't working PR is more than welcomed Extra attention is needed globe Globe related issues labels Nov 21, 2024
@JakubJagoda
Copy link
Author

JakubJagoda commented Nov 21, 2024

@HarelM yeah, I guess that was the issue for text. But just to be sure we're on the same page - this issue is about image. I only mentioned the text, because seeing it suffered similar problem and being fixed at some point, confirms to me that what I'm seeing with image is indeed a bug.

@HarelM
Copy link
Collaborator

HarelM commented Nov 21, 2024

Sure, sure, I'm expecting a similar solution, that's why I mentioned it.

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

No branches or pull requests

2 participants