I am trying to get the route as a polyline in order to make a parallel
of it. The purpose is to make a polygon from two parallels and two
half circles (buffer). The point is that in google maps api you could
use the getPolyline method but there is no more in v3. The alternative
solution is that you can use something like:
var myRoute = directionResult.routes[0].legs[0];
so you get an array of the points of the route.
After this i am trying to make a polyline by doing:
var ParallelPoints = [
for (var i=0; i < myRoute.steps.length-1; i++){
myRoute.steps[i].start_point,
}
myRoute.steps[myRoute.steps.length].start_point
];
but i am getting an error all the time and i am assuming that you
cannot use a for loop inside the array ParallelPoints.
Any idea?
--
You received this message because you are subscribed to the Google Groups
"Google Maps JavaScript API v3" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-maps-js-api-v3?hl=en.