This is part 1 of a series of tutorial for the googleDirections plugin.
Using the googleDirections plugin is as easy as 1-2-3:
- Specify the start point. This can be real address or in latitude/longitude.
- Specify the end point. This can be real address or in latitude/longitude.
- Specify the
width
,height
anddir_width
. This sets the size of your map (width
andheight
), and also the width of the directions (dir_width
).
Different ways of specifying Start and End points
- You can specify the start and end point using real address
- Enclose from and to in double quotes (")
- Enter the full address in one line. If you're not in US, specify your country too.
- You can specify the start and end point using latitude / longitude
- This method allows you to pinpoint very accurately to the exact start and end points that you want, especially when Google cannot decode your address correctly.
- If you need to know the latitude and longitude of the start or end point, you can find out here: Free Geocoder v2.0 by kksou.
- Enclose the latitude/longitude in double quotes (")
{googleDir width=400 height=360 dir_width=275 from="1600 Amphitheatre Parkway, Mountain View CA 94043" to="701 First Avenue, Sunnyvale, CA 94089"}
{googleDir width=400 height=360 dir_width=275 from="37.4211444, -122.0853032" to="37.4148428, -122.0249135"}
Width and Height of the Map and Directions
- Note that for Google Map with directions, you cannot specify the width and height in percentages. All dimensions are in px.
- Please make sure you set all the 3 dimensions:
width
,height
anddir_width
, otherwise no map or direction will appear on your page.
Zoom Level
You do not need to specify any zoom level.
The default zoom level of the map is automatically set by Google such that the start point and end point are being displayed optimally on the map.
Tutorials for the googleMaps plugin
- googleMaps plugin Tutorial 01: Getting Started
- googleMaps plugin Tutorial 02: Zoom Level
- googleMaps plugin Tutorial 03: Language
- googleMaps plugin Tutorial 04: Map Type
- googleMaps plugin Tutorial 05: KML Files
Tutorials for the googleDirections plugin
- googleDirections plugin Tutorial 01: Getting Started
- googleDirections plugin Tutorial 02: Specifying Stopover Points
- googleDirections plugin Tutorial 03: Travel Modes
- googleDirections plugin Tutorial 04: Unit Systems - miles or km
- googleDirections plugin Tutorial 05: Display Directions on the Left
- googleDirections plugin Tutorial 06: Display Directions below the Map
- googleDirections plugin Tutorial 07: Display Directions in your Local Language
- googleDirections plugin Tutorial 08: Specifying Stopover Points
Tutorials for the googleDirections_to_here plugin
- googleDirections - To Here - plugin Tutorial 01: Getting Started
- googleDirections - To Here - plugin Tutorial 02: Adding Label to Home Address
- googleDirections - To Here - plugin Tutorial 03: Travel Modes
- googleDirections - To Here - plugin Tutorial 04: Unit Systems - miles or km
- googleDirections - To Here - plugin Tutorial 05: Display Directions on the Left
- googleDirections - To Here - plugin Tutorial 06: Display Directions below the Map
- googleDirections - To Here - plugin Tutorial 07: Display Directions in your Local Language
- googleDirections - To Here - plugin Tutorial 08: Specifying Stopover Points
Read more...