Google MAPS DirectionsRenderer()

Posted on 2011-04-25
Last Modified: 2012-06-27
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?
Question by:Richard Korts
    LVL 107

    Accepted Solution

    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

    Author Comment

    by:Richard Korts
    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.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    I feel like more and more people want to know how to programmatically convert addresses into geospatial locations. So in this article, I will show you how you can do it with Bing Maps. I'm going to use PowerShell, which is a nice scripting language,…
    Introduction This article is designed to assist GIS (Geographic Information System) and GPS (Global Positioning System) developers using ESRI ArcGIS and other spatial information management systems.   For the uninitiated the concept of projectio…
    This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
    This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    7 Experts available now in Live!

    Get 1:1 Help Now