Search code examples
linuxgoogle-mapsgoogle-maps-api-3kmlgoogle-earth

How to find the route between two points/markers in Google Earth using KML?


Google Maps API has a route function to do the same. Couldn't find anything like that in Google Earth API.

  • How to find the route/path between two points/markers in Google Earth?

This is to be done on Linux, so won't be able to integrate it with Javascript API of Google maps.


Solution

  • Use the DirectionsAPI. It's linked from the Javascript Maps API documentation but is a REST API and can return results in XML.

    Just make sure to check the Terms of Service to verify that your usage is allowed.