This is the users Google API Key. This may also be set using the constructor when a new instance is instanciated.
This method sets the google map controllers such as zoom control, map control etc. This method may be called multiple times to set multiple controls for the map. Options are:
  • GLargeMapControl
  • GSmallMapControl
  • GSmallZoomControl
  • GScaleControl
  • GMapTypeControl
  • GHierarchicalMapTypeControl
  • GOverviewMapControl
<?php $map->addGoogleMapControl("GSmallMapControl"); ?>
This sets the map type to one of four options:
  • normal
  • satellite
  • hybrid
  • physical
<?php $map->mapType "normal"?>
This sets the center of the map within the div bounds. The value is an array containing the latitude and longitude of the map center, in that order.
$map->mapCenter = array(-33.862828, 151.216974); 1
This sets the map zoom level. Options are an integer from zero to seventeen ( 0 - 19 ). The zero value is the widest zoom level and shows the whole world. While 19 is the maximum zoom and will show buildings. Each zoom level doubles the zoom. The default value is 12.
This function is used to create and place markers upon the map. the addMarker method takes three args.
  • float $latitude
  • float $longitude
  • string $html
The latitude and longitude are both numeric values and the html may be any HTML or text to be placed in the marker baloon.
This method works similar to the phproogle::addMarker() and places a marker upon the map. However, rather than accepting a latitude and longitude to place the marker, this method takes two values.
  • string $address
  • string $html
The address parameter is a simple address such as "2 Rue des Perons Paris France". The html parameter is again, any text or HTML to be placed in the info balloon.
When set, this will set the ID of the div that the map resides in. The default value is "map"
As the name suggests, this will set the width of the div that the map resides in. The default width is 350 pixels.
This will set the height of the div that the map resides in. The default value is 300 pixels.
This method returns the javascript string that is used most often in the document head that displays the connecting string with google API Key.
This method returns the completed javascript to produce the map itself.