I've been doing something similar where I first normalize the 500
points into 25 (every 20th point or so), then combine all the route
steps into one series. It's a bit clunky though since the combined
steps aren't perfectly fluid and there is some repetition at the
borders. My next goal may be to cleanse this series of steps to join
similar items (ie, 2+ directions along the same street).
directions.loadFromWaypoints(lls25,{getSteps:true});
GEvent.addListener(directions, 'load', function() {
var steps = new Array();
for(var i = 0; i < directions.getNumRoutes(); i++){
var route = directions.getRoute(i); // GRoute obj
for(var j = 0; j < route.getNumSteps(); j++){
var step = route.getStep(j); // GStep obj
steps.push(step);
}
}
});
On Sep 2, 12:05 am, Gregory Short <[email protected]> wrote:
> Just join all the pieces together. That is, you have A, B, C, D, and you
> want to go through them in order. Thus, A->B + B->C + C->D = A->D by way of
> B, C. That is how maps.google.com does it. They just don't label the
> intermediate points for the user as such.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---