1ec5 left a comment (openstreetmap/openstreetmap-website#6790)
#6683 initializes the map as soon as the container element is available. I
guess the difference from Leaflet is that, since GL JS renders to a
background context, it would potentially start rendering before the element is
visible. But I’m surprised that wasn’t happening with the maplibre-gl-leaflet
compatibility shim already.
The requests for z1 tiles are because the maps don’t zoom and pan until the
user opens the layer switcher. From code inspection, I don’t see how this code
would run before that point.
https://github.com/openstreetmap/openstreetmap-website/blob/2b9ef12d372bdac871322e2b963d51c1daa865d3/app/assets/javascripts/leaflet.layers.js#L46
In principle, we could set no style during initialization and defer setting the
style until the first time the layer switcher appears.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/6790#issuecomment-3879236881
You are receiving this because you are subscribed to this thread.
Message ID:
<openstreetmap/openstreetmap-website/issues/6790/[email protected]>
_______________________________________________
rails-dev mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/rails-dev