Google Maps API [Directions API] Waypoints limitation?

11,815

Solution 1

Try sending multiple requests.

Solution 2

The Google Maps Api V3 says:

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

Share:
11,815
vale4674
Author by

vale4674

Updated on July 09, 2022

Comments

  • vale4674
    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
    vale4674 over 13 years
    You 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
    vale4674 over 13 years
    ok 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
    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
    Vishwanath about 9 years
    Although 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
    miguev almost 8 years
    Now 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
    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
    mikep about 7 years
    See my answer in similar question with full code example stackoverflow.com/questions/8779886/…
  • mikep
    mikep about 7 years
    You can use as many waypoints as you want for free with this solution: stackoverflow.com/questions/8779886/…