Reading Google Maps matrix result (1 Viewer)

smig

Registered User.
Local time
Today, 11:12
Joined
Nov 25, 2009
Messages
2,209
I'm trying the google maps matrix to calculate Distance and time of travel.

I send it using an HTTP, and it seems to work fine

How do I read the the XML result?
Code:
<DistanceMatrixResponse>
<status>OK</status>
<origin_address>Jerusalem, Israel</origin_address>
<destination_address>Tel Aviv, Israel</destination_address>
<row>
<element>
<status>OK</status>
<duration>
<value>1675</value>
<text>50 min</text>
</duration>
<distance>
<value>25277</value>
<text>52 km</text>
</distance>
</element>
</row>
</DistanceMatrixResponse>
 

jdraw

Super Moderator
Staff member
Local time
Today, 05:12
Joined
Jan 23, 2006
Messages
15,361
smig,

You may get some ideas from this older post
Driving Distance Between 2 zip.
See the later entries in the thread where there is reference to info on some changes made by Google that affects databases in the thread.
 

MrHans

Registered User
Local time
Today, 10:12
Joined
Jul 27, 2015
Messages
147
Additionally you should read up on Xpath, this is what Google recommends for parsing the result.
 

smig

Registered User.
Local time
Today, 11:12
Joined
Nov 25, 2009
Messages
2,209
Thank you all
Mission solved :)
 

Users who are viewing this thread

Top Bottom