Thanks for your responses.
I had use the parameter trips[x].routes[y].steps[z].lat_lngs for
create the polyline objects instead to use the DirectionsRenderer
object.

This is my code if someone would encounter the same problem.

directionsService.route(request, function(response, status) {
        if (status == google.maps.DirectionsStatus.OK)
        {
                var steps = response.trips[0].routes[0].steps;

                for(var step = 0; step < steps.length; step++)
                {
                        polylineOptions = {
                                map: map,
                                strokeColor: "#FF0000",
                                strokeOpacity: 0.7,
                                strokeWeight: 5,
                                path: steps[step].lat_lngs,
                        }
                        new google.maps.Polyline(polylineOptions);
                }
        }
}
-- 
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.


Reply via email to