Google Directions with Multiple Stopovers

The following sample shows how to display Google Maps directions for multiple destinations or stopovers using the googleDirections plugin that uses the latest Google Maps API v3.

Important: This plugin makes use of the googleMaps plugin and googleDirections plugin to display the map. So please make sure you have installed googleMaps plugin v1.0.17/1.5.17/1.6.17/1.7.17 (or above) and googleDirections plugin v1.0.11/1.5.11/1.6.11/1.7.11 (or above) for this plugin to work.

If you have downloaded and installed the above plugins before the Christmas of 2011 (i.e. Dec 25, 2011), you are using the old version. Please update the two plugins to the latest version.

Code used:

{googleDir width=400 height=360 dir_on_right=1 
from="Stanford University, CA 94305" 
to="39210 Fremont Hub #211, Fremont, CA 94538" 
stopover="456 University Ave. Palo Alto, CA 94301; 
1600 Amphitheatre Parkway, Mountain View CA 94043;
701 First Avenue, Sunnyvale, CA 94089"}

Note that:

  • There is only one from=""
  • There is only one to=""
  • For the intermediate stopover, or what Google calls them "waypoints", you specify them using the keyword "stopover", with each stopover/waypoint delimited by ';':
    stopover="waypoint1; waypoint2; waypoint3; waypoint4"
    
  • The maximum number of stopover points imposed by Google is 8. Details here: Maximum number of waypoints or stopover points

MapDirections

Add comment


Security code
Refresh