You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For comparison MapLibre has no problem displaying layers at resolutions beyond that of OpenLayers view zoom 0
(which instead of a multiWorld constraint uses the equivalent of an OpenLayers [-Infinity, minY, +Infinity, maxY] extent constraint).
The text was updated successfully, but these errors were encountered:
In both the examples adding minZoom: 0 to the layer options prevents the maxResolution being set inappropriately, but it would be better to fix this at the cause.
While this issue is specific to applyStyle and MapboxVectorLayer the code in finalizeLayer from which any fix would be based looks out of date as it should now be able to handle non-standard projections but always uses defaultResolutions. Should that now be options.resolutions || defaultResolutions (with the hardcoded 24 changed to match that length)? And when units are degrees simply adding 1e-9 to a resolution might not give a good result, multiplying by (1 + 1e-9) might be more appropriate.
Open https://openlayers.org/en/v6.14.1/examples/vector-tiles-4326.html in a window with width 1024px or less, the layer is visible.
Repeat with https://openlayers.org/en/latest/examples/vector-tiles-4326.html the layer is not visible until the view is zoomed in to just beyond level 2.
The same problem can be seen in https://openlayers.org/en/latest/examples/mapbox-vector-layer.html if zooming out to level 1 or less in a smaller (512px or less) window.
This was introduced by #520 (and later moved to apply.js), however there was already code which takes care not to set a
maxResolution
on layers if the sourceminZoom
is 0 https://github.com/openlayers/ol-mapbox-style/blob/main/src/apply.js#L1206 while the new code simply setsmaxResolution
regardless https://github.com/openlayers/ol-mapbox-style/blob/main/src/apply.js#L315For comparison MapLibre has no problem displaying layers at resolutions beyond that of OpenLayers view zoom 0
(which instead of a
multiWorld
constraint uses the equivalent of an OpenLayers[-Infinity, minY, +Infinity, maxY]
extent constraint).The text was updated successfully, but these errors were encountered: