googleDirections plugin Tutorial 04: Unit Systems - miles or km |
|
Written by kksou
|
|
Thursday, 05 January 2012 |
|
This is part 4 of a series of tutorial for the googleDirections plugin.
- By default, directions are calculated and displayed using the unit system of the origin's country or region.
- For example, a route from "Chicago, IL" to "Toronto, ONT" will display results in miles, while the reverse route will display results in kilometers.
- Origins expressed using latitude/longitude coordinates rather than addresses always default to metric units.
- You can specify the unit system to be used in the driving instructions:
METRIC specifies usage of the metric system. Distances are shown using kilometers.
IMPERIAL specifies usage of the Imperial (English) system. Distances are shown using miles.
Unit Systems
- In Miles
{googleDir width=360 height=360 dir_width=275 unit=IMPERIAL
from="333 Post St, San Francisco, CA 94108"
to="900 N Point St, San Francisco, CA 94109"}
- In Kilometers
{googleDir width=360 height=360 dir_width=275 unit=METRIC
from="333 Post St, San Francisco, CA 94108"
to="900 N Point St, San Francisco, CA 94109"}
Tutorials for the googleMaps plugin
Tutorials for the googleDirections plugin
Tutorials for the googleDirections_to_here plugin
|