Wednesday, March 10, 2010

A good day for salesmen that travel on bicycles

When we launched Directions in Maps API v3 last year we asked "Where will you go from here?". You may have asked the same question of us, and today we're pleased to be taking another step forward with several new Maps API v3 Directions features.
  • Avoid highways and tolls. If you prefer to take the road less traveled you can now generate routes that avoid highways. Similarly, if you find yourself a little short of loose change, you can avoid tolls.

  • Route optimization. Have many places to go but no preference as to the order you visit them in? We can now reorder the waypoints of your route to minimize the distance and time you must travel. Very useful for traveling salesman I hear.

  • Bicycling directions. Prefer your vehicles of the two wheeled human powered variety? In conjunction with the launch of Bicycling directions in Google Maps you can now also request directions in Maps API v3 that are tailored to your Penny-farthing.
You can try these new features using the below map. Simply click to create waypoints and then generate directions between them. The first and last points you click are the start and end point, which remain fixed when the route is optimized. Any intermediary points may be reordered.


Note that Bicycling directions are currently only available in the U.S., and that the Bicycling layer available on Google Maps is not yet available in the Maps API.

In conjunction with these new features we are also making some changes to the DirectionsResults structure in response to developer feedback. The object representing a complete journey from origin to destination was previously called a "trip" but is now being renamed to a "route". The object previously called a "route", which represents the portion of the journey between two consecutive waypoints, is being renamed to a"leg". For more details please see the Maps API V3 Services documentation.

We will support both the old and new naming scheme in the v3 API for a transition period until May 1st, after which the old names will be removed. Please update any existing applications to use the new names. We realise this change may cause some inconvenience, but believe the new naming scheme is more intuitive for newcomers to the Maps API.

We hope that you will find interesting ways to put these new features to good use. Now if you'll excuse me, I have a bicycle to find and dust off...