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
{{ message }}
Repository navigation
Research spike: inventory impact of removing leaflet from OHM #828
What's your idea for a cool feature that would help you use OHM better.
For a variety of reasons documented in #651 , we will eventually migrate off of leaflet.
Given that there is no upstream solution on the visible horizon, we should get a more detailed understanding of the work entailed with doing this work on our own.
We should assess:
Everywhere leaflet plays a role in the codebase
Which functionality we would want to focus on migrating
Routing, for example, should be out of scope, as it is not something of primary use on OHM.
Here’s a preliminary assessment from #651 (comment), but it’s entirely possible that I’m overlooking something, so we’ll need to examine the codebase more closely:
This upgrade will require us to rewrite the site’s Leaflet integration, which consists of several custom controls and some external plugins such as leaflet-osm. Some of this code has readily available replacements, either built into GL JS or as plugins. As far as I can tell, the impact to the custom time slider and inspector code should be minimal.
I don’t know of a direct replacement for leaflet-osm, but Overpass turbo and Overpass Ultra both use osmtogeojson to convert OSM XML or OSM JSON data into GeoJSON, which GL JS understands natively. This would also resolve some prominent, longstanding bugs like openstreetmap/leaflet-osm#32.
Activity
1ec5 commentedon Jun 13, 2024
Here’s a preliminary assessment from #651 (comment), but it’s entirely possible that I’m overlooking something, so we’ll need to examine the codebase more closely:
I don’t know of a direct replacement for leaflet-osm, but Overpass turbo and Overpass Ultra both use osmtogeojson to convert OSM XML or OSM JSON data into GeoJSON, which GL JS understands natively. This would also resolve some prominent, longstanding bugs like openstreetmap/leaflet-osm#32.
1ec5 commentedon Jan 3, 2026
The saga continues in openstreetmap/openstreetmap-website#6234.