1ec5 left a comment (openstreetmap/openstreetmap-website#6234)
I noticed that several key elements of the homepage are implemented as Leaflet
controls. For example, the Layers and Share panes are backed by an
[`L.OSM.SidebarPane`](https://github.com/openstreetmap/openstreetmap-website/blob/56b153f62b77543a24708e4958d6097e189d6eeb/app/assets/javascripts/leaflet.sidebar-pane.js)
control. When it expands, it scoots the button strip to the left to simulate
pulling out a drawer. It also changes the effective center of the map. We’ll
need to make sure a replacement based on
[`IControl`](https://maplibre.org/maplibre-gl-js/docs/API/interfaces/IControl/)
will behave similarly.
> The last one is the newest and claims to be much more performant.
Additionally, MapLibre itself is able to render GeoJSON much more performantly
than Leaflet, since it doesn’t involve the DOM. This is why, for instance,
Overpass turbo warns about loading [more than 5,000 features or
10 megabytes of
data](https://github.com/tyrasd/overpass-turbo/blob/eb5d0f57d82d1a469d14dd4351aead200615a3f3/js/ide.ts#L972),
but Ultra does not. The data layer has a slightly lower feature limit:
https://github.com/openstreetmap/openstreetmap-website/blob/56b153f62b77543a24708e4958d6097e189d6eeb/app/assets/javascripts/index/layers/data.js#L54-L58
I think we should leave the limit as it is. Increasing it would add load to the
Overpass API endpoint. Spyglass promises to be a more flexible backend for a
data layer, but that isn’t strictly necessary for a MapLibre migration, and
that service needs to be stood up first:
https://github.com/openstreetmap/operations/issues/1313#issuecomment-3677805377.
In the meantime, at least we can look forward to a more lightweight data layer.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/6234#issuecomment-3677972651
You are receiving this because you are subscribed to this thread.
Message ID:
<openstreetmap/openstreetmap-website/issues/6234/[email protected]>
_______________________________________________
rails-dev mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/rails-dev