reuse polyline path LatLng objects
For the Polylines you use a path attribute.
The directive you use to render the polyline takes the values you set within the scope (attribute), and creates an array of LatLng objects (google.maps.LatLng).
I would like to add the geometry library (which is easily done by appending it to the url 'https://maps.googleapis.com/maps/api/js?sensor=false&libraries=geometry').
Then I would like to show the distance of the polyline. To do this I need to use google.maps.geometry.spherical.computeLength()
This accepts the same array of LatLng objects as the polylines path.
Is there a way I can reuse the path LatLng objects (is it exposed) ?
The alternative is to create a new array of LatLng objects for the new function but it would be nicer to reuse what we already have.