Reedwan Nouman Reedwan Nouman - 29 days ago 5
AngularJS Question

Access map.directionsRenderers[0].directions.routes[0].overview_path.

I am using angular JS and ng-map.
Is it possible to get distance by using
map.directionsRenderers[0].directions.routes[0].overview_path

Answer

You can used this code to get your distances.

<p>APPROX DISTANCES: {{map.directionsRenderers[0].directions.routes[0].legs[0].distance.text}}</p>

to know more here is the link: https://developers.google.com/maps/documentation/javascript/examples/directions-simple

Comments