Google Maps: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 24: | Line 24: | ||
<pre> | <pre> | ||
{ | |||
"destination_addresses" : [ "585 Franklin St, Mountain View, CA 94041, USA" ], | |||
"origin_addresses" : [ "800 Alma St, Menlo Park, CA 94025, USA" ], | |||
"rows" : [ | |||
{ | |||
"elements" : [ | |||
{ | |||
"distance" : { | |||
"text" : "15.3 km", | |||
"value" : 15270 | |||
}, | |||
"duration" : { | |||
"text" : "18 mins", | |||
"value" : 1108 | |||
}, | |||
"status" : "OK" | |||
} | |||
] | |||
} | |||
], | |||
"status" : "OK" | |||
} | |||
</pre> | |||
Execute the example: | |||
<pre> | |||
mvn package exec:java | |||
</pre> | </pre> |
Revision as of 08:25, 23 January 2016
External
Internal
Distance API
Playground Example
Request URL example:
https://maps.googleapis.com/maps/api/distancematrix/json?origins=800+Alma+Street+Menlo+Park+CA+94025&destinations=585+Franklin+St+Mountain+View+CA+94041&key=...
Response example:
{ "destination_addresses" : [ "585 Franklin St, Mountain View, CA 94041, USA" ], "origin_addresses" : [ "800 Alma St, Menlo Park, CA 94025, USA" ], "rows" : [ { "elements" : [ { "distance" : { "text" : "15.3 km", "value" : 15270 }, "duration" : { "text" : "18 mins", "value" : 1108 }, "status" : "OK" } ] } ], "status" : "OK" }
Execute the example:
mvn package exec:java