Class GoogleMapDIVtag

Description

Google Map class

Located in /widgets/GoogleMap.inc (line 37)

Container
   |
   --XMLTagClass
      |
      --HTMLTagClass
         |
         --DIVtag
            |
            --GoogleMapDIVtag
Variable Summary
Method Summary
void generateMap ()
string getAddress ()
string getAPIKey ()
string getHeadJSCode ()
string getHeadJSLink ()
mixed getInfoText ()
boolean getInfoWindowType ()
int getMapHeight ()
int getMapWidth ()
boolean getShowControls ()
boolean getShowType ()
int getZoomLevel ()
int get_id ()
string get_style ()
void setAddress (string $address)
void setAPIKey (string $key)
void setInfoText (string $infotext)
void setInfoWindowType ([boolean $show = true])
void setMapHeight (int $height)
void setMapWidth (int $width)
void setShowControls ([boolean $show = true])
void setShowType ([boolean $show = true])
void setZoomLevel (int $zoom)
Variables
mixed $_address = array() (line 47)

Addresses to display

mixed $_apikey = null (line 42)

Google Maps API key - need this for anything to work.

mixed $_head_js_code = "
google.load('maps', '2');

function phl_gmap_load(zoom, type, control,
infowindowtype, canvas, addresses, infowindowtext)
{
if (google.maps.BrowserIsCompatible())
{
var map = new google.maps.Map2(document.getElementById(canvas));

// Hide the info window?

if (infowindowtype == '%s')
{
map.disableInfoWindow();
}

// Show the map controls?

if (type)
{
map.addControl(new google.maps.MapTypeControl());
}

// Show the map controls?

if (control)
{
map.addControl(new google.maps.SmallMapControl());
}

// Create the GeoCoder

var geocoder = new google.maps.ClientGeocoder();

// Show the map

for (var i = 0 ; i < addresses.length ; i++)
{
phl_show_address(map, geocoder, addresses[i],
infowindowtext[i], zoom, infowindowtype) ;
}
}
}

function phl_show_address(map, geocoder,
address, infowindowtext, zoom, infowindowtype)
{
geocoder.getLatLng(address,
function(latlng)
{
if (!latlng)
{
alert(address + ' not found');
}
else
{
map.setCenter(latlng, zoom);
var marker = new google.maps.Marker(latlng);
map.addOverlay(marker);
google.maps.Event.addListener(marker, \"click\",
function()
{
if (infowindowtype == '%s')
{
marker.openInfoWindowHtml(infowindowtext);
}
else
{
marker.openInfoWindow(infowindowtext);
}
});
//marker.openInfoWindow(address);
map.checkResize();
}
}
);
}"
(line 92)

Google Map Javascript code - needed in document HEAD section

mixed $_head_js_link = "http://www.google.com/jsapi?key=%s" (line 87)

Google Map Javascript library - needed in document HEAD section

mixed $_infotext = array() (line 52)

Info Text to display

mixed $_info_window_type = true (line 67)

Show Google Maps Info Window, on by default

mixed $_map_height = 300 (line 77)

Google Height width in pixels, 300 by default

mixed $_map_width = 450 (line 72)

Google Map width in pixels, 450 by default

mixed $_show_controls = true (line 62)

Show Google Maps controls, on by default

mixed $_show_type = false (line 57)

Show Google Maps type, off by default

mixed $_zoom_level = 15 (line 82)

Google Map zoom level, 15 by default

Inherited Variables

Inherited from DIVtag

DIVtag::$_tag
Methods
generateMap (line 397)

Generate Javascript and display the map

void generateMap ()
getAddress (line 227)

Get the address to display

  • return: - address to display
string getAddress ()
getAPIKey (line 207)

Get the Google Maps API key

  • return: - Google Maps API key
string getAPIKey ()
getHeadJSCode (line 186)

Get the Javascript code for the document header

  • return: - Javascript code to be included in document header
string getHeadJSCode ()
getHeadJSLink (line 176)

Get the link to the Google Maps Javascript library

  • return: - address to display
string getHeadJSLink ()
getInfoText (line 247)

Get the info text to display

  • return: - info text to display
mixed getInfoText ()
getInfoWindowType (line 367)

Get the show info window state of the map

  • return: - show info window state of the map
boolean getInfoWindowType ()
getMapHeight (line 287)

Get the height of the map

  • return: - height of the map
int getMapHeight ()
getMapWidth (line 267)

Get the width of the map

  • return: - width of the map
int getMapWidth ()
getShowControls (line 347)

Get the show controls state of the map

  • return: - show controls state of the map
boolean getShowControls ()
getShowType (line 327)

Get the show type state of the map

  • return: - show type state of the map
boolean getShowType ()
getZoomLevel (line 307)

Get the zoom of the map

  • return: - zoom of the map
int getZoomLevel ()
get_id (line 377)

Get the id of the div container

  • return: - zoom of the map
int get_id ()
get_style (line 387)

Get the style tag cintent of the div container

  • return: - style tag value of the div container
string get_style ()
setAddress (line 217)

Set the address to display

void setAddress (string $address)
  • string $address: - address to display
setAPIKey (line 197)

Set the Google Maps API key

void setAPIKey (string $key)
  • string $key: - Google Maps API key
setInfoText (line 237)

Set the info text to display

void setInfoText (string $infotext)
  • string $infotext: - info text to display
setInfoWindowType (line 357)

Set the show info window state of the map

void setInfoWindowType ([boolean $show = true])
  • boolean $show: - show info window state of the map
setMapHeight (line 277)

Set the height of the map

void setMapHeight (int $height)
  • int $height: - height of the map
setMapWidth (line 257)

Set the width of the map

void setMapWidth (int $width)
  • int $width: - width of the map
setShowControls (line 317)

Set the show controls state of the map

void setShowControls ([boolean $show = true])
  • boolean $show: - show controls state of the map
setShowType (line 337)

Set the show type state of the map

void setShowType ([boolean $show = true])
  • boolean $show: - show type state of the map
setZoomLevel (line 297)

Set the zoom of the map

void setZoomLevel (int $zoom)
  • int $zoom: - zoom of the map

Inherited Methods

Inherited From HTMLTagClass

HTMLTagClass::HTMLTagClass()
HTMLTagClass::render()
HTMLTagClass::set_class()
HTMLTagClass::set_id()
HTMLTagClass::set_style()

Inherited From XMLTagClass

XMLTagClass::XMLTagClass()
XMLTagClass::get_tag()
XMLTagClass::get_tag_attribute()
XMLTagClass::get_tag_name()
XMLTagClass::render()
XMLTagClass::reset_attributes()
XMLTagClass::set_cdata_flag()
XMLTagClass::set_collapse()
XMLTagClass::set_newline_after_closetag()
XMLTagClass::set_newline_after_opentag()
XMLTagClass::set_tag_attribute()
XMLTagClass::set_tag_attributes()
XMLTagClass::set_tag_name()
XMLTagClass::_set_flags()

Inherited From Container

Container::Container()
Container::add()
Container::add_reference()
Container::count_content()
Container::get_element()
Container::get_indent_flag()
Container::push()
Container::push_reference()
Container::render()
Container::reset_content()
Container::set_collapse()
Container::set_indent_flag()

Documentation generated on Fri, 28 Jan 2011 08:53:08 -0500 by phpDocumentor 1.4.3