I'm sorry but I am not very good at Javascript. This is the code I am trying
in order to create the two routes I want
function calcRoute() {
var request = [{
origin: startlatlng,
destination: joinLatLng,
waypoints: [{ location: day1 }, { location: day2 }, { location:
day3 }, { location: joinLatLng}],
travelMode: google.maps.DirectionsTravelMode.DRIVING
},
{
origin: joinLatLng,
destination: endlatlng,
avoidHighways: true,
waypoints: [{ location: joinLatLng }, { location: day7 }, {
location: day8 }, { location: day9 }, { location: day10 }, { location: day11
},
{ location: day12 }, { location: day13}],
travelMode: google.maps.DirectionsTravelMode.DRIVING
}];
directionsService.route(request, function (response, status) {
if (status == google.maps.DirectionsStatus.OK) {
directionsDisplay.setDirections(response);
}
});
}
As you can see, I have tried to make request an array. I don't think that
was what you meant though because it doesn't work. Can you please provide a
bit more help.
--
You received this message because you are subscribed to the Google Groups
"Google Maps JavaScript API v3" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/google-maps-js-api-v3/-/WcHqFWJtyxkJ.
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.