Google マップでちょっと変わったものを試してみました。私が達成しようとしているのは、時々繰り返される複数のウェイポイントを持つルートを描くことです。出発地: A、目的地: B、ウェイポイント {1, 2, 3, 4, 5, 6, 7, 3, 2, 1} としましょう。上から、常に失敗します。繰り返しの場所を取り出すと、ルートが表示されます。助けてください。ありがとうございます。
wayPoints.push(
{location:new google.maps.LatLng(stepsWP[0], stepsWP[1]),
stopover: false
}
...
var request = {
origin: start,
destination: end,
waypoints: wayPoints,
optimizeWaypoints: false,
travelMode: google.maps.TravelMode.DRIVING
};
var directionsRen = new google.maps.DirectionsRenderer(rendererOptions);
directionsRen.setMap(map);
directionsService.route(request, function(result, status) {
if (status == google.maps.DirectionsStatus.OK) {
directionsRen.setDirections(result);
}else{
console.debug('Something wrong with google...');
}
});