I'm trying to improve a workflow that currently involves manually composing a multi-destination driving route in Google Maps. I have the ability to export a KML file containing the points we want via RGDAL. I'm hoping to end up with a navigation route starting at one point in the KML and routing through all other points before returning to the starting point.

Is there a way to generate this route in Google Maps or Google Earth? The workflow currently ends with sharing a Google Maps link with coworkers who can then open the link on their phones and view the navigation directions the Maps app. Is there a straightforward way to generate a route like this, starting with a KML file?

  • have you looked at this? developers.google.com/maps/documentation/directions/intro – Jeryl Cook Feb 5 at 17:51
  • I had not looked at the API directly, no. That's useful info to see if we pursue a more custom workflow for creating these directions. I was hoping for a client-side "insert KML, get directions" process within Google Maps or Google Earth. – Taylor Heffernan Feb 5 at 17:56
  • (last used in Oct 2018) you can force MyMaps to export KML (with your route) example google.com/maps/d/u/0/kml?mid={MAP_ID}&forcekml=1 – Mapperz Feb 5 at 17:59
  • That implies that a route has already been created. I want to start with a KML with no directions, import it into MyMaps, generate directions from the points in the KML, and share that. – Taylor Heffernan Feb 5 at 18:04
  • you should perhaps add an example stating KML in your question... it sounds like you will have to do some coding to parse this KML ...feed it into one of the APIs mentioned in comments, then get the resulting KML – Jeryl Cook Feb 5 at 18:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.