Google Maps API [Directions API] Waypoints limitation?
11,815
Solution 1
Try sending multiple requests.
Solution 2
MAX_WAYPOINTS_EXCEEDED indicates that too many DirectionsWaypoints were provided in the DirectionsRequest. The maximum allowed waypoints is 8, plus the origin, and destination. Maps API Premier customers are allowed 23 waypoints, plus the origin, and destination.
You can go for API Premier but i guess it will cost you about 10.000$ a year
Author by
vale4674
Updated on July 09, 2022Comments
-
vale4674 almost 2 years
Documentation says that waypoints limit is 8 points. But I have to draw a line with more than 8 waypoints. How to do that?
-
vale4674 over 13 yearsYou mean as hardcode my GPS locations? E.g. if I have 16 locations I should send 2 requests: 10 (start + end + 8 waypoints) + 6 (start + end + 4 waypoints)
-
vale4674 over 13 yearsok tnx. that should do the trick.. but I think that it is stupid that v2 had mulitple waypoints and now v3 of API does't have that. No point in that.
-
Pavan Alapati about 9 years@Vishwanath We faced same problem.Please can you explain.how sending multiple request. We have array(waypoint).In Array have 21 latitude and longitude.We need when we page load 21 points will be showing google_mpas –
-
Vishwanath about 9 yearsAlthough this is very old question and this was more of a suggestion than my own implementation. Check the very first comment by vale4674 for the idea...
-
miguev almost 8 yearsNow you can use go with "Standard Plan", much cheaper and still allows you to use the 23 waypoints: developers.google.com/maps/documentation/directions/…
-
terbubbs almost 8 years@miguev I am having an issue accessing that 23 waypoint limit in the standard plan. can you take a look at my question that I just posted? stackoverflow.com/questions/38702402/…
-
mikep about 7 yearsSee my answer in similar question with full code example stackoverflow.com/questions/8779886/…
-
mikep about 7 yearsYou can use as many waypoints as you want for free with this solution: stackoverflow.com/questions/8779886/…