1

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...');
        }
    });
4

2 に答える 2

0

ありがとう。私はいくつかのグーグルを行い、回避策に関するいくつかの提案を見つけました。 http://techquarries.blogspot.com/2010/08/using-more-than-8-waypoints-in-google.html http://lemonharpy.wordpress.com/2011/12/15/working-around-8 -waypoint-limit-in-google-maps-directions-api/ http://mostup.com/2011/02/15/google-map-api-v3-directionsservice-more-than-8-waypoints-workaround/

于 2012-06-23T12:37:05.107 に答える