On Jul 27, 5:18 am, novitonics <[email protected]> wrote:
> Hello,
> I read sometime ago that in order to calculate a route with waypoints,
> there was a limit of 25 waypoints (including origin and destination).
> Well I tried with 20 waypoints and the script won't work.
>
> Suprisingly I tried with 10 waypoints and the route was calculated
> with no issue.
> The parameter set I used to calculate my route are the following:
>
> var request = {
>      origin:bars[0],
>      destination:bars[9],
>      waypoints: [{location:bars[1],stopover:true}.......,
> {location:bars[8],stopover:true}],
>      optimizeWaypoints: false,
>      avoidTolls: true,
>      travelMode: google.maps.DirectionsTravelMode.DRIVING};
>
> where bars is my array containing LatLang objects.
> So this code works perfectly well untill I add one more waypoint. Then
> it seems as if the script doesn't even execute.

That code is for v3 of the Google Maps API.  The limits there are 8
waypoints (plus start and end) for the free API (as you discovered),
and 23 waypoints for premier/enterprise customers.

This group is for the v2 API where the limit is 25, at least last time
I looked...
The v3 group is:
http://groups.google.com/group/google-maps-js-api-v3/topics?hl=en

>
> My question is: is there a way to concatenate 2 routes and thus
> compose a route containing 20 waypoints?

What have you tried that didn't work?
(although you probably should move this discussion to the v3 group...)

  -- Larry

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps API" 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-api?hl=en.

Reply via email to