I would like to know if it is possible to change the way the itinerary calculation algorithm works in the Google Maps API (or Bing Maps). Basically, I’d like to add options, like for example “shortest route” or “avoid highways and national roads”.
I haven’t found anything in the API that might manage the road’s cost, so I think it’s not possible but maybe someone’s got an idea of a way to do that?
There is no way to modify the pathfinder algorithm beyond the
avoidHighwaysandavoidTollsoptions. See here for documentation:http://code.google.com/apis/maps/documentation/javascript/reference.html#DirectionsRequest
Another method would be to specify
provideRouteAlternativesand figure out which of these routes is best according to your own heuristic.