valhalla / demos

demos
MIT License
98 stars 58 forks source link

Simplistic Route Comparision Front End #236

Closed kevinkreiser closed 3 years ago

kevinkreiser commented 3 years ago

At the moment our routing front end demo is very.... complex. I needed to be able to quickly compare two routes for the purposes of RAD and to that end I thought it would be nice to create a tool to do that for me. At first I was just piping the json output through jq and building a url that i could click and view in the polyline demo. The problem there is that when you want to look at two geometries you have to switch between two browser tabs or windows. That was not working for me when I needed to look at hundreds of diffs. So I came up with this.

  1. you can point and click on the map and it will route you that way. its very simplistic though
  2. you get a text box where you can manually specify the request
  3. the anchor/permalink functionality works and is the literal json payload that you can also put in the text box
  4. you can do an array of requests at one time, this is useful for diffing or useful for doing a batch of routes in the same area
  5. TODO: allow user defined coloring (useful for diffs)

image