Search code examples
angularjsng-map

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


Solution

  • 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