Thanks.

I'd forgotten about the TSP.

My problem isn't TSP difficult since the points aren't entirely
random, the route is linear, and the two end points are fixed. Here's
how I've decided to tackle the problem which I'm posting for any
others who may find it useful.

If the initial route is generally East <--> West, order waypoints by
lng. North <--> South order by lat. To determine the "general
direction" of the initial route, call GLatLngBounds with the initial
points, then determine whether the bounding box is wider than it is
tall (East <--> West) or thinner (North <--> South).

Now I just have to do the math.

Thanks again for the pointer.

On Nov 13, 5:01 pm, "warden [Andrew Leach - Maps API Guru]"
<[EMAIL PROTECTED]> wrote:
> On Nov 13, 7:18 pm, Informagence <[EMAIL PROTECTED]> wrote:
>
> > I could calculate routes for all possible combinations and then pick
> > the shortest route, but the permutations are mind-bogglingly large
> > when you get past 5 or 6 waypoints.
>
> Yes. It's called the Travelling Salesman Problem. Searching for that
> will find some posts with useful information about it (among all the
> others which say what the problem is called)
>
> Andrew
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to