Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I correct my previous answer this is possible. You use the google directions API as outlined in this link: </p> <p>You send your direction request and it returns the directions either as json or xml as per your preference. Gives you coordinates of each point on the route. </p> <p>You send a request to <code>http://maps.googleapis.com/maps/api/directions/outputformat?parameters</code></p> <p>So if you want to return the directions as json the request would be:</p> <p><code>http://maps.googleapis.com/maps/api/directions/json?origin=ORIGIN_LOCATION&amp;destination=DESTINATION_LOCATION&amp;sensor=FALSE</code></p> <p>the <code>ORIGIN_LOCATION</code> and <code>DESTINATION_LOCATION</code> can either be a latitude and longitude seperated by a comma e.g. <code>latitude,longitude</code> or a location search string e.g <code>Eiffel+Tower+,+Paris+France</code> (The search string has to be url encoded). </p> <p>The sensor parameter is another compulsory parameter and asks whether the device sending the request can detect its own location. </p> <p>For example for the directions from the eiffel tower to the louvre museum are given on the following link as json:</p> <p><a href="http://maps.googleapis.com/maps/api/directions/json?origin=Louver+museum+Paris&amp;destination=Eiffel+Tower+Paris+France&amp;sensor=false" rel="nofollow">http://maps.googleapis.com/maps/api/directions/json?origin=Louver+museum+Paris&amp;destination=Eiffel+Tower+Paris+France&amp;sensor=false</a></p> <p>And to return it as XML:</p> <p><a href="http://maps.googleapis.com/maps/api/directions/xml?origin=Louver+museum+Paris&amp;destination=Eiffel+Tower+Paris+France&amp;sensor=false" rel="nofollow">http://maps.googleapis.com/maps/api/directions/xml?origin=Louver+museum+Paris&amp;destination=Eiffel+Tower+Paris+France&amp;sensor=false</a></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload