Route-snapper refactoring and behavioral improvements
- Ngôn ngữ chính
- Rust
- Star
- 21
- Fork
- 7
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
We use https://github.com/dabreegster/route_snapper/ for drawing boundary areas and for marking roads along a snapped route.
## Frontend code duplication
Both have pretty heavy pieces of Svelte code to handle all of the interactions, with lots of logic duplicated between the two, and lots more duplicated among other projects using this tool. Originally that upstream repo had a common [JS client](https://github.com/dabreegster/route_snapper/tree/main/route-snapper) and a very stateful Rust backend, but it evolved to do all of the state management in Svelte. It'd be useful to share some of the frontend code between all the projects using it, even though they all have slightly different requirements and styling.
## Backend
In this codebase, we use a separate Rust WASM backend for the route snapping, creating the input for it [here](https://github.com/a-b-street/ltn/blob/main/backend/src/route_snapper.rs). It could be better to have those WASM APIs directly in this codebase, rather than use the common upstream lib. That would let us:
- [ ] Only snap to things inside the current neighbourhood, when drawing main roads. Parallel roads just outside the boundary are easy to snap to, but won't have any effect
- [ ] Minimize waypoints after drawing an area (and avoid the polygon simplification logic?)
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Đánh giá
Issue này chưa được đánh giá.