Skip to content

Conversation

@nickw1
Copy link
Contributor

@nickw1 nickw1 commented Feb 5, 2023

This is a small change to index.ts to add the vertex keys to the edgeDatas of each edge of the calculated route.

Why is this useful? It allows an approximate calculation of the distance of each edge on the route. For my use case (an augmented-reality walking app), I wish to calculate what proportion of the route is on footpaths (trails), and reject the route if the proportion is below a certain value. Adding the vertex keys to each edge allows this.

Tested (on my own app, https://github.com/nickw1/hikar.js) and it works, I also displayed each edgeData on the console, and it shows up as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant