IsraelHikingMap / VectorMap

Vector Maps for the Israel Hiking and Biking Maps
Other
10 stars 6 forks source link

Text and icon do not keep the same position when rotating #150

Closed HarelM closed 1 year ago

HarelM commented 1 year ago

Problem

the icon and the text are not rotated "together". See the following image - סאלחה and I think also מצפה איילת. image This is the location: https://israelhiking.osm.org.il/map/17.28/33.0757/35.4523 You'll need to rotate the map so that when south is up.

When north is up everything looks as expected: image

zstadler commented 1 year ago

This looks like a Maplibre issue.

The style uses

https://github.com/IsraelHikingMap/VectorMap/blob/b5e0ab6d9400aff6aa333f864dc0ef189261b9e3/Styles/IHM.json#L4831

yet the text shifts left and right when rotating the map

image image

There is also an up-and-down movement in-between image image

HarelM commented 1 year ago

While I'm not arguing this might be a maplibre bug, can you think why the ruins and viewpoint texts behaves differently (one overlaps while the other moves away from the icon)? I'll see if I can create a minimal reproduction using only maplibre and open a bug there if I succeed...

zstadler commented 1 year ago

It also happens with ruins

image image

BUT, it is not a Maplibre bug!

If text-translate is used to shift the text relative to the point, "text-translate-anchor": "viewport" should also be used. I have no idea why this is not the default.

On the other hand, I have no idea why I used text-translate in the first place. text-offset does the work on its own.