Directions distance in Google Maps API v3?

While it does not seem to be documented officially, it looks like you can traverse the response from the DirectionsService.route() method: response. Trips0. Routes0.distance.

Value as in the following example.

While it does not seem to be documented officially, it looks like you can traverse the response from the DirectionsService.route() method: response. Trips0. Routes0.distance.

Value, as in the following example: Google Maps JavaScript API v3 Example: Directions Complex Duration: Distance: Screenshot showing distance and duration.

It is not working for me. I got an error "response. Trips not defined".Upd.

The answer - response.tripsi. Routes0.duration. Value should be response.routesi.

Legs0.duration.value. – Malx Jun 24 '10 at 16:03 @Malx: Thanks for the correction. I updated the answer.

This is strange, because I'm sure I tested that example when I posted it. In fact, that's how I got the screenshot :) – Daniel Vassallo Jun 24 '10 at 16:59 It is not strange - the API was changed. I found the answer on google groups.

– Malx Aug 14 '10 at 10:13 @Malx: Yep, I happened to notice it in the docs a few days a few days later. It is mentioned here: code.google. Com/apis/maps/documentation/javascript/… :) – Daniel Vassallo Aug 14 '10 at 10:40.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions