Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><a href="http://code.google.com/apis/maps/documentation/directions/" rel="noreferrer">Google Maps API - Directions</a> is a good place to start.</p> <p>Sending off a request using the URL Pattern:</p> <pre><code>http://maps.google.com/maps/api/directions/xml?origin=[FROM_ADDRESS]&amp;destination=[TO_ADDRESS]&amp;sensor=false // [FROM_ADDRESS] is a Google-Recognisable address for the Start // [TO_ADDRESS] is a Google-Recognisable address for the End </code></pre> <p>Example - "How do I get to Carnegie Hall? (From Sony Music Entertainment)"</p> <p>Start Address: 550 Madison Avenue, New York, NY, United States End Address: 881 7th Avenue, New York, NY, United States</p> <p>The URL for the XML Directions from Google would be</p> <pre><code>http://maps.google.com/maps/api/directions/xml?origin=550+Madison+Avenue,+New+York,+NY,+United+States&amp;destination=881+7th+Avenue,+New+York,+NY,+United+States&amp;sensor=false </code></pre> <p>The result is:</p> <pre><code>&lt;DirectionsResponse&gt; &lt;status&gt;OK&lt;/status&gt; &lt;route&gt; &lt;summary&gt;E 57th St&lt;/summary&gt; &lt;leg&gt; &lt;step&gt; &lt;travel_mode&gt;DRIVING&lt;/travel_mode&gt; &lt;start_location&gt; &lt;lat&gt;40.7612400&lt;/lat&gt; &lt;lng&gt;-73.9731300&lt;/lng&gt; &lt;/start_location&gt; &lt;end_location&gt; &lt;lat&gt;40.7622900&lt;/lat&gt; &lt;lng&gt;-73.9723600&lt;/lng&gt; &lt;/end_location&gt; &lt;polyline&gt; &lt;points&gt;wdxwF`{nbMqEyC&lt;/points&gt; &lt;levels&gt;BB&lt;/levels&gt; &lt;/polyline&gt; &lt;duration&gt; &lt;value&gt;9&lt;/value&gt; &lt;text&gt;1 min&lt;/text&gt; &lt;/duration&gt; &lt;html_instructions&gt; Head &lt;b&gt;northeast&lt;/b&gt; on &lt;b&gt;Madison Ave&lt;/b&gt; toward &lt;b&gt;E 56th St&lt;/b&gt; &lt;/html_instructions&gt; &lt;distance&gt; &lt;value&gt;133&lt;/value&gt; &lt;text&gt;436 ft&lt;/text&gt; &lt;/distance&gt; &lt;/step&gt; &lt;step&gt; &lt;travel_mode&gt;DRIVING&lt;/travel_mode&gt; &lt;start_location&gt; &lt;lat&gt;40.7622900&lt;/lat&gt; &lt;lng&gt;-73.9723600&lt;/lng&gt; &lt;/start_location&gt; &lt;end_location&gt; &lt;lat&gt;40.7655300&lt;/lat&gt; &lt;lng&gt;-73.9800500&lt;/lng&gt; &lt;/end_location&gt; &lt;polyline&gt; &lt;points&gt;ikxwFfvnbMgS`o@&lt;/points&gt; &lt;levels&gt;BB&lt;/levels&gt; &lt;/polyline&gt; &lt;duration&gt; &lt;value&gt;148&lt;/value&gt; &lt;text&gt;2 mins&lt;/text&gt; &lt;/duration&gt; &lt;html_instructions&gt; Turn &lt;b&gt;left&lt;/b&gt; at the 2nd cross street onto &lt;b&gt;E 57th St&lt;/b&gt; &lt;/html_instructions&gt; &lt;distance&gt; &lt;value&gt;741&lt;/value&gt; &lt;text&gt;0.5 mi&lt;/text&gt; &lt;/distance&gt; &lt;/step&gt; &lt;step&gt; &lt;travel_mode&gt;DRIVING&lt;/travel_mode&gt; &lt;start_location&gt; &lt;lat&gt;40.7655300&lt;/lat&gt; &lt;lng&gt;-73.9800500&lt;/lng&gt; &lt;/start_location&gt; &lt;end_location&gt; &lt;lat&gt;40.7651800&lt;/lat&gt; &lt;lng&gt;-73.9803000&lt;/lng&gt; &lt;/end_location&gt; &lt;polyline&gt; &lt;points&gt;q_ywFhfpbMdAp@&lt;/points&gt; &lt;levels&gt;BB&lt;/levels&gt; &lt;/polyline&gt; &lt;duration&gt; &lt;value&gt;39&lt;/value&gt; &lt;text&gt;1 min&lt;/text&gt; &lt;/duration&gt; &lt;html_instructions&gt; Turn &lt;b&gt;left&lt;/b&gt; at the 3rd cross street onto &lt;b&gt;7th Ave&lt;/b&gt; &lt;div style="font-size:0.9em"&gt;Destination will be on the left&lt;/div&gt; &lt;/html_instructions&gt; &lt;distance&gt; &lt;value&gt;45&lt;/value&gt; &lt;text&gt;148 ft&lt;/text&gt; &lt;/distance&gt; &lt;/step&gt; &lt;duration&gt; &lt;value&gt;196&lt;/value&gt; &lt;text&gt;3 mins&lt;/text&gt; &lt;/duration&gt; &lt;distance&gt; &lt;value&gt;919&lt;/value&gt; &lt;text&gt;0.6 mi&lt;/text&gt; &lt;/distance&gt; &lt;start_location&gt; &lt;lat&gt;40.7612400&lt;/lat&gt; &lt;lng&gt;-73.9731300&lt;/lng&gt; &lt;/start_location&gt; &lt;end_location&gt; &lt;lat&gt;40.7651800&lt;/lat&gt; &lt;lng&gt;-73.9803000&lt;/lng&gt; &lt;/end_location&gt; &lt;start_address&gt;550 Madison Ave, New York, NY 10022, USA&lt;/start_address&gt; &lt;end_address&gt;881 7th Ave, New York, NY 10019, USA&lt;/end_address&gt; &lt;/leg&gt; &lt;copyrights&gt;Map data ©2010 Google, Sanborn&lt;/copyrights&gt; &lt;overview_polyline&gt; &lt;points&gt;wdxwF`{nbMqEyCgS`o@dAp@&lt;/points&gt; &lt;levels&gt;B@?B&lt;/levels&gt; &lt;/overview_polyline&gt; &lt;/route&gt; &lt;/DirectionsResponse&gt; </code></pre> <p>So, the quickest route between those two points will have details of:</p> <ul> <li><p>Duration in Seconds</p> <p>DirectionsResponse > route > leg > duration > value</p></li> <li><p>Duration in Plain Text</p> <p>DirectionsResponse > route > leg > duration > text</p></li> <li><p>Distance in Base Unit of Local Measurements (Feet or Metres)</p> <p>DirectionsResponse > route > leg > distance > value</p></li> <li><p>Distance in Plain Text for Local Measurement (Miles or Kilometers)</p> <p>DirectionsResponse > route > leg > distance > text</p></li> </ul>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

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