osm2streets icon indicating copy to clipboard operation
osm2streets copied to clipboard

Publish osm2lanes NPM package

Open dabreegster opened this issue 1 year ago • 2 comments

For @kfarr to try out in 3dstreet. Should be a JS API with OSM tags as input (just a string/string map) and JSON lane specifications (something like [{lane_type: "driving", width: 2.5, direction: "forward"}, ...]) as output.

  • [x] Create osm2lanes-js and publish to NPM
  • [ ] Clean up the hasty refactor, possibly having a crate in the osm2streets repo with base types
  • [ ] Stop re-exporting types from osm2streets crate?

dabreegster avatar Oct 03 '23 18:10 dabreegster

@kfarr, this is on NPM and ready for you to use. You can open https://github.com/a-b-street/osm2streets/blob/main/osm2lanes-js/example.html in your browser and it should just work. (You have to save the raw file from GH, then open in your browser). There's some comments to hopefully make things clear, but the API isn't properly documented anywhere yet (and also it's subject to change of course). Hopefully it's enough to at least get started; please ping if you hit any problems

dabreegster avatar Oct 06 '23 10:10 dabreegster

Thanks @dabreegster for putting this together in such a fast amount of time. I'm sorry it will take me longer to digest this. We will be in touch when there's something to see.

kfarr avatar Oct 14 '23 05:10 kfarr