I would like to use the google directions API to develop route planning software for a company that handles snowplows in the winter and landscaping in the summer. One of the customers requirements is that he be able to calculate routes with at least 30 ( preferably more ) waypoints. According to the documentation (quoted below) even Google Maps API for Work customers are limited to just 23 waypoints per request.
Use of the Google Directions API is subject to a query limit of 2,500 directions requests per day. Individual directions requests may contain up to 8 intermediate waypoints in the request. Google Maps API for Work customers may query up to 100,000 directions requests per day, with up to 23 waypoints allowed in each request.
Is anyone aware of a workaround -- any way at all -- to get around this?
Also -- might it be possible to use a workaround for the free API? I hear the premier accounts are quite expensive.
You are correct the premier pricing is rather expensive starting at $10,000, last time I spoke with a google rep on the phone.
I found a workaround that I put into place to in a way bypasss the 8 waypoints limitation. I was able to make it work.
I did this by receiving my waypoints and breaking them up into different routes but drawing them together as the same route.
Example being if there were 30 waypoints needed I would draw 4 lines, but with the same color etc. So, basically you cut the waypoints into different routes calling the directions renderer each time as if it was a different route. The key is after the first route that the next route has to start with the last waypoint of the previous route (this makes sure that the route lines are connected to each other)
It works but you need to write a lot more code than what you would if you had a premier account, and you are calling for directions a lot more in this instance.
I have searched and thought about other ways to do this without having a premier account and have failed.
Although, I when speaking with google they did say that they intended on creating a tiered structure of payment for customers with different wants/needs. For instance, if a customer just needed more waypts and not a bunch more direction requests.