Documentation

PhoogleMap Class Reference

Public Member Functions

__contruct ($key)
isSideBarEnabled ()
setDefaultIcon ($definition)
setShowType ($flag)
getShowType ($flag)
setZoomLevel ($level)
getZoomLevel ()
addControlType ($controlType)
getType ()
enableAutoZoom ()
getDefaultIcon ()
setActionClick ($function)
getActionClick ()
setActionOver ($actionHover)
getActionHover ()
enableDragnDrop ()
enableOpenWindowInformation ()
defineDragnDropAction ($parameters)
addGeoPoint ($long, $lat, $address, $title, $infoHTML, $icon=null)
centerMap ($lat, $long)
addAddress ($address, $title=null, $htmlMessage=null, $icon=null)
showValidPoints ($displayType, $css_id)
generateSideBar ()
showInvalidPoints ($displayType, $css_id)
setWidth ($width)
setHeight ($height)
setAPIkey ($key)
printGoogleJS ()
showMap ()
xml2array ($xml)
startElement ($parser, $name, $attrs)
characterData ($parser, $data)
endElement ($parser, $name)

Static Public Member Functions

static generateIcon ($url, $shadow=null, $iconSize, $shadowSize=array(‘height’=> 0, ‘width’=> 0), $iconAnchor=array(‘height’=> 0, ‘width’=> 0), $infoWindowAnchor=array(‘height’=> 5, ‘width’=> 5))

Data Fields

$validPoints = array()
$invalidPoints = array()
$mapWidth = 300
$mapHeight = 300
$apiKey = «  »
$showControl = true
$showType = true
$controlType = array()
$zoomLevel = 5
$sideBarEnabled = false
$defaultIcon
$actionClick = null
$actionOver = null
$marker = null
$dragndrop = false
$openWindowInformation = false

Member Function Documentation

__contruct ( $ key )

Instanciation of a PhoogleMap object

Parameters:
$key Google Map Api Key
Returns:
unknown_type

addAddress ( $ address,
$ title = null,
$ htmlMessage = null,
$ icon = null
)

addAddress

Parameters:
$address:(string) Full and true address of the marker
$htmlMessage:(String) the HTML Code for Description of the Information Window
$iconURL:(String) The URL of the ICON
Returns:
Boolean Return false if the geocode is valid or true even Add’s an address to be displayed on the Google Map (thus eliminating the need for two different show methods from version 1.0)

addControlType ( $ controlType )

addControlType add the control type « small » or « large »

Parameters:
$controlType
Returns:
unknown_type

addGeoPoint ( $ long,
$ lat,
$ address,
$ title,
$ infoHTML,
$ icon = null
)

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

centerMap ( $ lat,
$ long
)

centerMap center’s Google Map on a specific point (thus eliminating the need for two different show methods from version 1.0)

characterData ( $ parser,
$ data
)

characterData

Parameters:
$parser
$data
Returns:
unknown_type

defineDragnDropAction ( $ parameters )

defineDragnDropAction Define an action when somebody makes a drag & drog on a marker

Returns:
String

enableAutoZoom ( )

Intelligent Zoom and resizing Reposition algorithm for rezoom and resizing fully automatized with an intelligence

Returns:
unknown_type

enableDragnDrop ( )

enableDragnDrop Enable drag & drop on marker

Returns:
void

enableOpenWindowInformation ( )

Enable OpenWindowInformation

Returns:
unknown_type

endElement ( $ parser,
$ name
)

endElement

Parameters:
$parser
$name
Returns:
unknown_type

static generateIcon ( $ url,
$ shadow = null,
$ iconSize,
$ shadowSize = array ('height' => 0, 'width' => 0),
$ iconAnchor = array ('height' => 0, 'width' => 0),
$ infoWindowAnchor = array('height' => 5, 'width' => 5)
) [static]

function generateIcon

Parameters:
$url (String) URL of the icon
$shadow (String) URL of the icon’s shadow
$iconSize (Array (height, width)) icon’s dimensions
$shadowSize (Array (height, width)) shadow icon’s dimensions
$iconAnchor (Array (height, width)) Icon Anchor
$infoWindowAnchor (Array (height, width)) infoWindowAnchor
Returns:
nothing Generate javascript to make a marker icon

generateSideBar ( )

generateSideBar

Returns:
nothing Display a slidebar which generate dynamic links with Google Map

getActionClick ( )

getActionClick return the click event

Returns:
array: $this->actionClick

getActionHover ( )

getActionHover Return an action when the mouse is over the marker

Returns:
String

getDefaultIcon ( )

getDefaultIcon

Returns:
String Default Icon Definition

getShowType ( $ flag )

getShowType Return the flag for control view

Parameters:
$flag
Returns:
unknown_type

getType ( )

getControlType get the control type « small » or « large »

Returns:
$controlType

getZoomLevel ( )

getZoomLevel Return the zoom level

Returns:
unknown_type

isSideBarEnabled ( )

return sidebarstatus

printGoogleJS ( )

printGoogleJS

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

setActionClick ( $ function )

setClickFunction Define the click event on a marker or on sidebar

Parameters:
Array:parameters
Returns:
void

setActionOver ( $ actionHover )

setActionOver Definition of an action when the mouse is over the marker

Returns:
void

setAPIkey ( $ key )

setAPIkey

Parameters:
$key:string
Returns:
nothing Stores the API Key acquired from Google

setDefaultIcon ( $ definition )

setDefaultIcon Definition of a default icon

setHeight ( $ height )

setHeight

Parameters:
$height:int
Returns:
nothing Sets the height of the map to be displayed

setShowType ( $ flag )

setShowType Enable or disable with a flag the control view

Parameters:
$flag
Returns:
unknown_type

setWidth ( $ width )

setWidth

Parameters:
$width:int
Returns:
nothing Sets the width of the map to be displayed

setZoomLevel ( $ level )

setZoomLevel

Parameters:
$level Change the zoom level
Returns:
unknown_type

showInvalidPoints ( $ displayType,
$ css_id
)

showInvalidPoints

Parameters:
$displayType:string
$css_id:string
Returns:
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

showMap ( )

showMap enhance the view of the map on a PHP Template

Returns:
HTML Code

showValidPoints ( $ displayType,
$ css_id
)

showValidPoints

Parameters:
$displayType:string
$css_id:string
Returns:
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

startElement ( $ parser,
$ name,
$ attrs
)

XML Parsing Method StartElement

Parameters:
$parser
$name
$attrs
Returns:
unknown_type

xml2array ( $ xml )

XML Parsing Engine

Parameters:
string $xml
Returns:
array $xmlarray

Field Documentation

$actionClick = null

$actionOver = null

$apiKey = «  »

apiKey Google API Key

$controlType = array()

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

$defaultIcon
Initial value:

 "
        var gIcon = new GIcon();
        gIcon.image = \"http://labs.google.com/ridefinder/images/mm_20_red.png\";
        gIcon.shadow = \"http://labs.google.com/ridefinder/images/mm_20_shadow.png\";
        gIcon.iconSize = new GSize(12, 20);
        gIcon.shadowSize = new GSize(22, 20);
        gIcon.iconAnchor = new GLatLng(20, 6);
        gIcon.infoWindowAnchor = new GLatLng(1, 5);"

defaultIcon (String) Javascript definition of the default icon, standard Google Map marker icon by default

$dragndrop = false

$invalidPoints = array()

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

$mapHeight = 300

mapHeight height of the Google Map, in pixels

$mapWidth = 300

mapWidth width of the Google Map, in pixels

$marker = null

$openWindowInformation = false

$openWindowInformation : Enable or disable WindowInformation on markers

$showControl = true

showControl True/False whether to show map controls or not

$showType = true

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

$sideBarEnabled = false

sideBarEnabled boolean true or false enable the sidebar (false by default)

$validPoints = array()

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

$zoomLevel = 5

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


Haut de page