waypoints: Limited ammount?

590 views
Skip to first unread message

novitonics

unread,
Jul 27, 2010, 9:38:28 AM7/27/10
to Google Maps JavaScript API v3
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.


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

geoco...@gmail.com

unread,
Jul 27, 2010, 7:05:22 PM7/27/10
to Google Maps JavaScript API v3
You should be able to (obviously you can't do too many without risking
running into the 2500/day quota (and associated rate limit), but I
would think 2 would work. What have you tried?

-- Larry

-- Larry

Luke Mahé

unread,
Jul 27, 2010, 9:03:08 PM7/27/10
to google-map...@googlegroups.com
Hi Novitonics,

For non premier customers there is a limit of 8 waypoints. When you add the start and end locations that makes the 10 that you are seeing. For premier customers the limit is 23 + start + end.

I've made a request for these limits to be added to the JS docs but you can read the limits on the Web Services directions page http://code.google.com/apis/maps/documentation/directions/#Limits

Hope this helps.

-- Luke



--
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 google-map...@googlegroups.com.
To unsubscribe from this group, send email to google-maps-js-a...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.


novitonics

unread,
Jul 28, 2010, 7:06:10 AM7/28/10
to Google Maps JavaScript API v3
Thanks, I might have to purchase premier then.

On Jul 28, 3:03 am, Luke Mahé <lu...@google.com> wrote:
> Hi Novitonics,
>
> For non premier customers there is a limit of 8 waypoints. When you add the
> start and end locations that makes the 10 that you are seeing. For premier
> customers the limit is 23 + start + end.
>
> I've made a request for these limits to be added to the JS docs but you can
> read the limits on the Web Services directions pagehttp://code.google.com/apis/maps/documentation/directions/#Limits
>
> Hope this helps.
>
> -- Luke
>
> On Wed, Jul 28, 2010 at 9:05 AM, geocode...@gmail.com
> <geocode...@gmail.com>wrote:
> > google-maps-js-a...@googlegroups.com<google-maps-js-api-v3%2B­unsub...@googlegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/google-maps-js-api-v3?hl=en.- Hide quoted text -
>
> - Show quoted text -
Reply all
Reply to author
Forward
0 new messages