0

Documentation says that waypoints limit is 8 points. But I have to calculate a route with more than 8 waypoints. How to do that?

I figured out that i can do multiple requests with different waypoints till I have all the directions.

Now my question : How to know which waypoint belongs to which request? Else the driver who gets the directions will drive around in circles :)

Can anybody help me with this or point me in the right direction? Thanks in advance!

Edit: I saw the other post on this problem, but that one was allready answered. It didn't really help me because I allready figured out that answer.

Community
  • 1
  • 1
Jacob Francke
  • 425
  • 6
  • 23
  • possible duplicate of [Google Maps API \[Directions API\] Waypoints limitation?](http://stackoverflow.com/questions/4418875/google-maps-api-directions-api-waypoints-limitation) – jprofitt Apr 13 '12 at 12:00
  • yes, i saw the post, but there's no answer to my question. Because the post was already answered i started a new post. – Jacob Francke Apr 13 '12 at 12:03
  • I added that before you had edited your question. As a good rule of thumb, go ahead and link to questions you've used as research so people know you've done your work as well. – jprofitt Apr 13 '12 at 12:05
  • Sorry for that, I'm a fairly new user. Next time i'll make the referrals :) – Jacob Francke Apr 13 '12 at 12:17

2 Answers2

0

There are two problems with your proposed system:

  1. Should your site be successful, you will stop getting answers from the directions service due to too many requests from the same ip address
  2. The contracts offered by Google allow for more than 8 way points - you are therefore opening yourself to potential problems with Google !

Having said that, from what I understand, you have a list of destinations which make up your global itinerary. In addition I feel that this itinerary is not to be completed in one day/trip.

Why not simply request directions for each step and store the result ?

Simon
  • 2,208
  • 4
  • 32
  • 47
  • Hi Simon, Thanks for your answer, it's not a website what it's about. The script is runned by a cronjob once a day. I'm not affraid google will block the server because there are to many requests from the same IP. I have a itinerary with more then 8 waypoints, but they are quite close to each other. It can easily be done by the courier in one day. I can request directions one by one, but I don't know how to put them in the right order. Thanks again for your help! – Jacob Francke Apr 13 '12 at 13:33
  • Are you displaying the directions on a Google Map? – andresf Apr 13 '12 at 17:35
  • That's not neccesary, it's just a list with locations and the direction the driver needs to go. – Jacob Francke Apr 16 '12 at 06:55
0

You might want to check out the following:

http://lemonharpy.wordpress.com/2011/12/15/working-around-8-waypoint-limit-in-google-maps-directions-api/

Jonathan
  • 4,916
  • 2
  • 20
  • 37