1ec5 left a comment (openstreetmap/openstreetmap-website#6234)

> [A symbol 
> layer](https://maplibre.org/maplibre-gl-js/docs/examples/center-the-map-on-a-clicked-symbol/)
>  using the runtime styling API. This is the traditional MapLibre approach 
> with better performance and the ability to have the symbol underlap other 
> layers, but interactivity is harder to implement. This is the same API we’d 
> use to overlay an element’s geometry or a route line on the map, but it would 
> probably be overkill for just a marker.

Once we get to migrating the main map on the homepage, we’ll need to replace 
[leaflet-osm](https://github.com/openstreetmap/leaflet-osm/)’s 
`L.OSM.DataLayer` class with an alternative library that carries no dependency 
on Leaflet. We use this class to overlay element geometries from the OSM API’s 
/full response.

MapLibre GL JS has built-in support for GeoJSON overlays, so we only need 
a library for the conversion from that JSON format to GeoJSON, but not for the 
overlay classes themselves. I know of three such libraries: 
[osmtogeojson](https://github.com/tyrasd/osmtogeojson/), 
[osm2geojson-lite](https://github.com/tibetty/osm2geojson-lite/), 
[osm2geojson-ultra](https://github.com/dschep/osm2geojson-ultra/). The last one 
is the newest claims to be much more performant.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/6234#issuecomment-3672139717
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

Reply via email to