LoginRegisterCommercial SupportContact Us


Plug-in Web Applications > GoogleMaps

GoogleMaps

posted on 12:46 PM, May 28, 2008
Adds interactive Google Maps to your web page.
icon.gif
This plug-in provides an interface to the Google Maps API.

You must have a Google Maps key to get access to the API. The key is free; you can get it at: http://www.google.com/apis/maps/signup.html.

When you add the plug-in to the page, there are many parameters you can specify in the parameter field. These are written in the format:

parameter=value&parameter=value&parameter=value...

The parameters are:

key=KEY
Google-provided Google Maps key
lon=LONLongitude for the map center (in degrees)
lat=LAT
Latitude for the map center (in degrees)
markerLonN=LON
Longitude for a pin marker (in degrees)
markerLatN=LAT
Latitude for a pin marker (in degrees)
typeControl=true|false
Turn the "Map/Satellite/Hybrid" option on/off
height=H
Set the height of the map in pixels
width=W
Set the width of the map in pixels
markerTextN=HTML
Set popup text for a pin marker

Defaults for these options can be provided through the GoogleMaps.conf. They can also be overridden in the query string.

Bugs

Note that the Google Maps 2 API crashes Safari v1 browsers.

The Google Maps tools requires an onload event handler. If you use this plugin on a page where other .onload events occur, they must be combined into one function after the plug-in is loaded. DMenu is an example of a plugin that uses onload events.

Example:

<script type="text/javascript">
window.onload=function() {
cbeInitialize("DIV", "SPAN");
if (window.windowOnload) window.windowOnload();
init(); // google maps onload event
}
</script>

Filed under: google