googleDirections - To Here - plugin
Written by kksou   
Monday, 01 June 2009

This plugin is an extension of the googleDirections plugin. You specify a designated place to be the destination, and let the user enter the adddress he or she is coming from. Google will then provide the driving or walking directions from the user-specified address to your designated place.

The Google API Key

The plugin makes use of the Google Maps API provided by Google. As such, please make sure you have the Google Maps API. If you don't have the key, you can sign up for free here.


Latest Version

v1.0.3 (for Joomla 1.0) and v1.5.3 (for Joomla 1.5)
Released October 1, 2009

Fixed the bug: "Notice: Undefined variable: map_id in /var/www/html/rcl122/plugins/content/googleDirections_tohere/googleDirections_tohere.lib.php on line 126". Thanks to Rockiesrider for highlighting this.

Geocoding your address

This plugin requires that you input your designated place in geographic coordinates (i.e. the latitude and longitude).

If you do not know the latitude and longitude of your designated place, you can them find out here: Free Geocoder v2.0 by kksou.

googleMaps Plugin

This plugin is for showing directions using Google Maps API.

If you just need a simple map (without any driving directions), you can use the googleMaps plugin.

googleDirections Plugin

This plugin has the destination fixed at your designated place.

If you want to be able to specify both the starting point and destination as variables, please use the googleDirections plugin.

Demo

Below you can see a live demo of the plugin. The destination is Google Inc. in Mountain View, California. Enter some address in US, and let Google shows you how to get there.

MapDirections
Coming from:

How to use

  1. Very Important!!! Before you can make use of the plugin, please enter the Google Map API Key in the Parameters page in the Plugin Manager.
  2. Please also make sure that you have installed googleMaps plugin v1.0.10/1.5.10 (or above) and googleMaps plugin v1.07/1.57 (or above).
  3. To insert a Google Map with directions, use the following syntax:
  4. {googleDir_tohere width=400 height=360
    home_label="Google Inc." 
    home_lat=37.4219720, home_long=-122.0841430}
    

    home_lat: Latitude of your designated place
    home_long: Longitude of your designated place
    hoem_label: Heading that will be displayed by Google Destinations (for the point B which is your designated place).

  5. You can set the width of the address input in the Parameters page.
  6. You can change the text "Coming from:" to your own language in the Parameters page.
  7. You can change the button label "Get Directions" to your own language in the Parameters page.
  8. For new lines, please use ~. For example,
  9. {googleDir_tohere width=400 height=360
    home_label="Google Inc.~1600 Amphitheatre Parkway~Mountain View, CA 94043",
    home_lat=37.4219720, home_long=-122.0841430}}

Download

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.10/1.5.10 (or above) and googleMaps plugin v1.07/1.57 (or above) for this plugin to work. Very Important: This plugin works only with PHP5 and higher. It does not work with PHP4 because PHP4 does not support OOP multiple inheritance.
Thanks to Chaminda and Marc for sharing and highlighting this.

History

  1. v1.0.1 (for Joomla 1.0) and v1.5.1 (for Joomla 1.5)
    Released July 24, 2009
  2. This is in response to Chris's request to allow multiple lines for the home label.

    For new lines, please use ~ (similar to that of the googleMaps plugin). Please refer to here for details.

  3. v1.0.2 (for Joomla 1.0) and v1.5.2 (for Joomla 1.5)
    Released August 15, 2009
  4. Fixed the bug: <br /> appears in destination. Thanks to Rentawebguy for highlighting this.

    Also allows the user to specify a default country. This is in response to Chriscundy's request.

    You can view a sample here.



User reviews

There are no user reviews yet.

Note: You have to be a registered member to leave a comment. Free registration here.

 
< Prev   Next >

Blog - Forum - Privacy Policy - Contact Us
Copyright © 2006-2009. kksou.com. All Rights Reserved