Custom layer disappears at zoom level 12 in globe projection #5237
Replies: 4 comments
-
Is the "shake" of the triangles expected as part of this demo? I find it odd... |
Beta Was this translation helpful? Give feedback.
-
The map switches to mercator projection around zoom 12. Looks like you are drawing vertices with coordinates computed with If you want your layers to work well at high zooms, you will need to take floating point precision into account and for example draw things relative to a tile, using the tile's matrix (in mercator, globe has one matrix for everything). See Also make sure to use the |
Beta Was this translation helpful? Give feedback.
-
@kubapelc isn't this switch to mercator at 12 zoom level a little bit misleading? In our use case we are setting an uniform of projection (using map.getProjection()), based on that we are calculating ECEF or mercator coordinates in vertex shader. However when I zoom past 12.0 zoom level, |
Beta Was this translation helpful? Give feedback.
-
maplibre-gl-js version: 5.0.0-pre.10
browser: 131.0.6778.140 (Official Build) (arm64)
Steps to Trigger Behavior
https://codepen.io/kamil-sienkiewicz-asi/pen/bNbgPqR?editors=1010
Expected Behavior
Custom layer does not disappear
Actual Behavior
Kapture.2024-12-17.at.20.18.53.webm
Beta Was this translation helpful? Give feedback.
All reactions