Google MAPS DirectionsRenderer()

I am using this object to calculate dirving directions for service techs.

It seems that if there are more than 8 waypoints, the process fails.

I can post my code (mostly copied from the Google API documentation).

We will likely need about 20 waypoints in some instances.

Is there a way around this?
Richard KortsAsked:
Who is Participating?
Ray PaseurConnect With a Mentor Commented:
Google has a set of "enterprise-level" applications.  It's my sense that these paid application interfaces are more robust.  You might contact them about it.

But to the philosophical question... Have a look at this.  If I ask Google how to get from my home to the White House, I get something like these instructions.

1. Head south on Colleen Ln toward Loch Raven Dr
2. Turn left onto Loch Raven Dr
3. Turn left onto Kirby Rd
4. Turn right onto Dolley Madison Blvd
5. Take the ramp onto George Washington Memorial Pkwy
6. Take the exit onto I-66 E toward US-50 E/Washington
7. Continue onto US-50 E/Constitution Ave NW
8. Turn left onto 15th St NW
9. Take the 1st left onto E St NW

The first five pieces of information in that list take me from my front door to the first major road, only about a mile away.  Not to put too fine a point on it, but I am pretty sure I know how to get out of my neighborhood, and I don't need to devote half of the driving instructions to that part of the route.  

You might want to consider whether 20 waypoints is too much information.  A plain map with a zoom feature (and some common sense) might be more useful to your drivers.  Just a thought. ~Ray
Richard KortsAuthor Commented:
To Ray_Paseur:

Thanks Ray.

I'm looking for a more automated thing.

The customer has almost 4,000 customers (Wichita KS area). Look at this example.

Click "Calc Route".

This is just a mock up; in this simple case, I hard coded all the addresses in JavaScript.

The real cust appts. are in a database. They want to be able to select a date (like tomorrow), AM or PM or all & get driving directions to the selected appts, where the directions are optimized via the "waypoints" as Google Maps calls them, from their office (1527 S. Washington)

I have this programmed in php. The problem is if there are more than 8 "waypoints", it fails. I have found docs that state an awareness of this but NOT the solution.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.