Closed droogmic closed 2 years ago
As mentioned by @dabreegster , but I don't really know how to approach this.
A simple idea to start -- use a normal slippy map, add a click handler that gives the lat,lng clicked, feed that into Overpass and look for road-like ways nearby (with the around modifier?), have the rest of the web interface below that.
With MapboxGL, getting clicks is easy: https://docs.mapbox.com/mapbox-gl-js/example/queryrenderedfeatures-around-point/ Leaflet also exposes an on-click event: https://leafletjs.com/reference.html#map-event
I can help with that if it's OK to have it simple JS + HTML. Will need/take a few days, though. First idea: I was thinking about a two-frame-solution where there is a separate map left and on click the right frame with the https://a-b-street.github.io/osm2lanes/ UI shows up. The UI at https://a-b-street.github.io/osm2lanes/ would need to have an option to take the way-ID via URL param.
would need to have an option to take the way-ID via URL param
This can probably done with a yew router: https://yew.rs/docs/concepts/router
We now have this in a vanilla JS version: https://github.com/a-b-street/osm2lanes/blob/main/web/index.html It'd be nice to combine the two still. Should we add some kind of hideable Mapbox panel in the yew version?
And we now have a version on the website thanks to https://github.com/a-b-street/osm2lanes/pull/124
The website https://a-b-street.github.io/osm2lanes/ has a "OSM Way ID", but it would be easier to select this from a slippy map.