Quickly hacked-together tool for creating routes/paths in google maps (either freehand or using the directions api between specific points)
Currently it supports
- hand drawing mode: path drawing (while moving mouse) where you can control the fidelity of the path (after how many meters it will create a new point)
- marker mode: placing markers (_they are draggable to adjust their position and the list is sortable to allow a specific order for the directions api to follow _) and then calling the Google Maps Directions API to get an path.
- exporting the path: as a JSON list of lattitude/longitude objects
Limitations:
- The google maps directions API allows only 23 waypoints (besides first/last nodes)
(see https://developers.google.com/maps/documentation/javascript/directions#waypoint-limits)
Uses:
- Bootstrap 4 (https://getbootstrap.com/docs/4.0/)
- Google Maps Javascript API (https://developers.google.com/maps/documentation/javascript/)
- Google Maps API Directions Service (https://developers.google.com/maps/documentation/javascript/directions)
- The Sortable module of the Draggable Library from Shopify (https://github.com/Shopify/draggable/tree/master/src/Sortable)