Google/GoogleMap.php

Classes 
author
Justin Johnson <justinjohnson@system7designs.com>
category
NoiseLabs
copyright
2005 system7designs
package
ToolKit Phoogle Maps 2.0 | Uses Google Maps API to create customizable maps that can be embedded on your website Copyright (C) 2005 Justin Johnson This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Phoogle Maps 2.0 Uses Google Maps Mapping API to create customizable Google Maps that can be embedded on your website
Classes
GoogleMap

Description

NoiseLabs\ToolKit\Google\GoogleMap

author
Justin Johnson <justinjohnson@system7designs.com>
author
Vítor Brandão <noisebleed@noiselabs.org>
Constants
LOCALHOST_API_KEY
Properties
$validPoints
$invalidPoints
$mapWidth
$mapHeight
$apiKey
$showControl
$showType
$controlType
$zoomLevel
Methods
create
addGeoPoint
centerMap
addAddress
showValidPoints
showInvalidPoints
setWidth
setHeight
setAPIkey
printGoogleJS
showMap
xml2array
startElement
characterData
endElement

Description

Uses Google Maps API to create customizable maps that can be embedded on your website.

This class is a rewrite of the original PhoogleMap class created by Justin Johnson (system7designs).

Constants

LOCALHOST_API_KEY

 LOCALHOST_API_KEY = 'ABQIAAAAdi_0xCw-nuskZRWE2Z6PBhT2yXp_ZAY8_ufC3CFXhHIE1NvwkxR3tBq3ZXP3CHmGs13Ec_yYzjqSfA'

Details

value
ABQIAAAAdi_0xCw-nuskZRWE2Z6PBhT2yXp_ZAY8_ufC3CFXhHIE1NvwkxR3tBq3ZXP3CHmGs13Ec_yYzjqSfA

Properties

$apiKey

 $apiKey = ''

apiKey Google API Key

Details

visibility
public
default
final
false
static
false

$controlType

 $controlType = 'small'

controlType string: can be 'small' or 'large' display's either the large or the small controls on the map, small by default

Details

visibility
public
default
small
final
false
static
false

$invalidPoints

 $invalidPoints = 'array'

invalidPoints : array Holds addresses and HTML Messages for points that are invalid (ie: don't have longitude and latitutde)

Details

visibility
public
default
array
final
false
static
false

$mapHeight

 $mapHeight = '300'

mapHeight height of the Google Map, in pixels

Details

visibility
public
default
300
final
false
static
false

$mapWidth

 $mapWidth = '300'

mapWidth width of the Google Map, in pixels

Details

visibility
public
default
300
final
false
static
false

$showControl

 $showControl = 'true'

showControl True/False whether to show map controls or not

Details

visibility
public
default
true
final
false
static
false

$showType

 $showType = 'true'

showType True/False whether to show map type controls or not

Details

visibility
public
default
true
final
false
static
false

$validPoints

 $validPoints = 'array'

validPoints : array Holds addresses and HTML Messages for points that are valid (ie: have longitude and latitutde)

Details

visibility
public
default
array
final
false
static
false

$zoomLevel

 $zoomLevel = '4'

zoomLevel int: 0-17 set's the initial zoom level of the map

Details

visibility
public
default
4
final
false
static
false

Methods

addAddress

addAddress(  $address,  $htmlMessage = null ) : Boolean

Add's an address to be displayed on the Google Map (thus eliminating the need for two different show methods from version 1.0).

Arguments
$address
$htmlMessage
Output
Boolean
True:False (True if address has long/lat, false if it doesn't)
Details
visibility
public
final
false
static
false

addGeoPoint

addGeoPoint(  $lat,  $long,  $infoHTML ) :

Add's an address to be displayed on the Google Map using latitude/longitude early version of this function, considered experimental.

Arguments
$lat
$long
$infoHTML
Details
visibility
public
final
false
static
false

centerMap

centerMap(  $lat,  $long ) :

Center's Google Map on a specific point (thus eliminating the need for two different show methods from version 1.0).

Arguments
$lat
$long
Details
visibility
public
final
false
static
false

characterData

characterData(  $parser,  $data ) :
Arguments
$parser
$data
Details
visibility
public
final
false
static
false

create

create(  $options = array ) :

Arguments
$options
Details
visibility
public
final
false
static
true

endElement

endElement(  $parser,  $name ) :
Arguments
$parser
$name
Details
visibility
public
final
false
static
false

printGoogleJS

printGoogleJS( ) : NoiseLabs\ToolKit\Google\othing

Adds the necessary Javascript for the Google Map to function should be called in between the html <head></head> tags.

Output
NoiseLabs\ToolKit\Google\othing
Details
visibility
public
final
false
static
false

setAPIkey

setAPIkey(  $key ) : NoiseLabs\ToolKit\Google\nothing

Stores the API Key acquired from Google.

Arguments
$key
Output
NoiseLabs\ToolKit\Google\nothing
Details
visibility
public
final
false
static
false

setHeight

setHeight(  $height ) : NoiseLabs\ToolKit\Google\nothing

Sets the height of the map to be displayed

Arguments
$height
Output
NoiseLabs\ToolKit\Google\nothing
Details
visibility
public
final
false
static
false

setWidth

setWidth(  $width ) : NoiseLabs\ToolKit\Google\nothing

Sets the width of the map to be displayed.

Arguments
$width
Output
NoiseLabs\ToolKit\Google\nothing
Details
visibility
public
final
false
static
false

showInvalidPoints

showInvalidPoints(  $displayType,  $css_id ) : NoiseLabs\ToolKit\Google\nothing

Displays either a table or a list of the address points that are invalid.

Mainly used for debugging shows only the points that are NOT on the map.

Arguments
$displayType
$css_id
Output
NoiseLabs\ToolKit\Google\nothing
Details
visibility
public
final
false
static
false

showMap

showMap( ) :

Displays the Google Map on the page.

Details
visibility
public
final
false
static
false

showValidPoints

showValidPoints(  $displayType,  $css_id ) : NoiseLabs\ToolKit\Google\nothing

Displays either a table or a list of the address points that are valid.

Mainly used for debugging but could be useful for showing a list of addresses on the map.

Arguments
$displayType
$css_id
Output
NoiseLabs\ToolKit\Google\nothing
Details
visibility
public
final
false
static
false

startElement

startElement(  $parser,  $name,  $attrs ) :
Arguments
$parser
$name
$attrs
Details
visibility
public
final
false
static
false

xml2array

xml2array(  $xml ) :
Arguments
$xml
Details
visibility
public
final
false
static
false
Documentation was generated by DocBlox.