Closed droogmic closed 2 years ago
I propose leaving the cleanups, (including removing your slippy map demo @dabreegster?) to a future PR...
Don't know if I posted this before… This leaflet plugin might provide some inspiration about interaction and code/query.
I guess one could also use it to query the ways and then start with the osm2lanes part on top of that.
https://www.youtube.com/watch?v=JTzVa9E0Yo8 gives a good overview. https://github.com/plepe/leaflet-overpass-lens is the code.
Don't know if I posted this before… This leaflet plugin might provide some inspiration about interaction and code/query.
I guess one could also use it to query the ways and then start with the osm2lanes part on top of that.
https://www.youtube.com/watch?v=JTzVa9E0Yo8 gives a good overview. https://github.com/plepe/leaflet-overpass-lens is the code.
hmm, don't think I saw this before, but I also don't think it adds much to our approach.
It seems they construct a geoJSON bounding box, whereas we just query overpass with around
. Niether is the preferred solution to the problem of finding the closest way.
I think the best example of what I am trying to do is: https://github.com/bbecquet/Leaflet.PolylineOffset with http://bbecquet.github.io/Leaflet.PolylineOffset/examples/example_cycle.html
I would vote leaving the slippy map demo in the repo as example code. I deliberately wrote in JS and not Rust with a framework there, to make it easy to follow for people who want to hook the WASM library up to some regular JS app.
oh true, I hadn't thought of that. I might refactor it to document it more clearly for that purpose.
Working example, cleanups will be needed as a follow-up.
@dabreegster, I used your map as inspiration, but really struggled to get the mapbox library integrated, whereas leaflet has a rust lib already :D