From/to address form PDF Print E-mail
Written by Mike Reumer   
Sunday, 16 January 2011 10:06

In the Googlemaps plugin you can show a form with from and to address so the user can enter it's own route and show it on the map.

{mosmap formaddress='1'|dir='5'|diralternatives='1'|txt_alternatives='Alternatives'}

You can define fixed waypoint(s) in the route by adding waypoints, for example:

{mosmap formaddress='1'|dir='5'|waypoint[1]='Utrecht'}

The following parameters can be used:

  • dirtype - If walking or driving directions should be shown
    • D - Driving
    • W - Walking
  • avoidhighways - Attempt to exclude highways when computing directions. Note that directions may still include highways if there are no viable alternatives, use 1 (default 0)
  • diroptimize - Specifies that the route using the supplied waypoints may be optimized to provide the shortest possible route so waypoints are reordered, use 1 (default 0).
  • diralternatives - Specifies that alternative routes may shown and can be chosen. Note that providing route alternatives may increase the response time from the server, use 1 (default 0).
  • showdir - Show route information for directions (use 1) or not (use 0).

To show the above options in the form, you must set the label of the parameter in the configuration of the plugin or use the necessary parameters, for example txt_alternatives='Alternatives'.

Last Updated on Saturday, 19 May 2012 21:33
 

Advertisement