This package is changing quickly due to evolving requirements from its main
user. Before 1.0
, expect the API to bounce all over the place. Please open a
Github issue if you're actively using this and want to give feedback on API
changes.
- Upgrade Rust geo dependencies
- Dedupe full_path output; it sometimes had duplicate adjacent nodes
- Add two new experimental stateless APIs. Do not use yet.
- Upgrade Rust geo dependencies
- The OSM importer can now handle MultiPolygon boundaries for clipping
- The final route feature has a new
full_path
property, with every snapped and freehand node
- Removed
fetchWithProgress
, which is a general-purpose utility method that should come from another library - Improved the tool that makes graphs from GeoJSON files by splitting LineStrings that touch at interior points
- Added
debugSnappableNodes
as a faster alternative todebugRenderGraph
- More details in
debugRenderGraph
- Add a new tool to make graphs from a GeoJSON file
- Allow edges to have custom costs in each direction. This is a breaking change to the binary graph format!
- Internally store WGS84 coordinates instead of Mercator (Breaking change to the binary graph format!)
- Undo support
- Include road labels for waypoints in interactive output
- Add an
addSnappedWaypoint
API for use with a geocoder
- Always start in snap mode for a new route, even if the user last used freehand mode.
- Color lines to show freehand/snapped as well
- Change the
renderGeojson
output to distinguish snapped and freehand waypoints - Include a
cursor
property in therenderGeojson
output - Distinguish hovered points in the
renderGeojson
output - Use a keypress to toggle snap/freehand mode, instead of holding down a key
- Convert existing nodes between snapped/freehand
- Added a
routeNameForWaypoints
API
- Include road names in the graph, and auto-populate a route name. (Breaking change to the binary graph format!)
- Output GeoJSON precision is now trimmed to 6 decimal places
fetchWithProgress
now takes a callback to return the progress as a percentage to the user.- Add
debugRenderGraph
andchangeGraph
APIs - Split
setConfig
intosetRouteConfig
andsetAreaMode
to prevent incorrect configuration
- Fix bugs where built-in controls can get out-of-sync with current settings
- By default, don't keep drawing more points to the end of the route
- Fix bug that created a new waypoint when clicking (and not dragging) an intermediate point
- Double click to end a route
- Add an optional mode to draw closed areas
- Adjust when the
activate
event is fired
- Add a
start
method, so the tool can be programmatically controlled - Add a button to cancel from drawing or editing a route
- Backfill missing
waypoints
properties if possible when callingeditExisting
. If you input routes drawn before 0.1.8, this will help, but may imperfectly restore the previous route. - Fix some race conditions at startup
- Add a
stop
method, so the tool can be programmatically controlled
- Add an
editExisting
method to modify previously drawn routes - The output now includes a
waypoints
property, used foreditExisting
- Add a
setConfig
method - Add optional behavior to avoid a route doubling back on itself
- The output now includes a
length_meters
property
- Added README to NPM package
- If the graph is disconnected, draw straight lines between points instead of breaking
- Fix missing lines when switching between freehand and snapped points
- Fix bugs snapping to wrong point when many are clustered together
- Always snap to the nearest point, no matter how far it is
- Improved styling for draggable points
- Start a
tearDown
method
- fetchWithProgress takes an element, not ID, to work better with Svelte
- Added
isActive()
method and new eventsactivate
andno-new-route
- No more top-level await required; callers must call
await init
themselves
- Initial NPM package