[ Index ] |
PHP Cross Reference of phpwcms V1.5.0 _r431 (28.01.12) |
[Source view] [Print] [Project Stats]
Project: GoogleMapAPI: a PHP library inteface to the Google Map API File: GoogleMapAPI.class.php
Author: | Monte Ohrt |
Author: | Oliver Georgi |
Copyright: | 2005 New Digital Group, Inc. |
Version: | 2.5 |
File Size: | 1711 lines (46 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
GoogleMapAPI:: (70 methods):
GoogleMapAPI()
initMap()
setDSN()
enableMooTools()
disableMooTools()
useJson()
useCSV()
getElementById()
setAPIKey()
setWidth()
setHeight()
setZoomLevel()
enableMapControls()
disableMapControls()
setControlSize()
enableTypeControls()
disableTypeControls()
setMapType()
enableOnLoad()
disableOnLoad()
enableSidebar()
disableSidebar()
enablePointlist()
disablePointlist()
enableDirections()
disableDirections()
setBrowserAlert()
setJSAlert()
enableInfoWindow()
disableInfoWindow()
setInfoWindowTrigger()
enableZoomEncompass()
disableZoomEncompass()
enableZoomWheel()
disableZoomWheel()
setBoundsFudge()
enableScaleControl()
disableScaleControl()
enableOverviewControl()
disableOverviewControl()
setLookupService()
addMarkerByAddress()
addMarkerByCoords()
addPolyLineByAddress()
addPolyLineByCoords()
adjustCenterCoords()
setCenterCoords()
createMarkerIcon()
setMarkerIcon()
addMarkerIcon()
printHeaderJS()
getHeaderJS()
printOnLoad()
getOnLoad()
printMapJS()
getMapJS()
getAddMarkersJS()
getPolylineJS()
getCreateMarkerJS()
printMap()
getMap()
printSidebar()
getSidebar()
getGeocode()
getCache()
putCache()
geoGetCoords()
fetchURL()
geoGetDistance()
geoGetDistanceInKM()
Class: GoogleMapAPI - X-Ref
GoogleMapAPI( $map_id = 'map', $app_id = 'MyMapApp' ) X-Ref |
class constructor param: string $map_id the id for this map param: string $app_id YOUR Yahoo App ID |
initMap($map_id = 'map', $app_id = 'MyMapApp') X-Ref |
No description |
setDSN( $dsn ) X-Ref |
sets the PEAR::DB dsn param: string $dsn |
enableMooTools() X-Ref |
No description |
disableMooTools() X-Ref |
No description |
useJson($path=NULL) X-Ref |
No description |
useCSV() X-Ref |
No description |
getElementById() X-Ref |
return the element by ID JavaScript String param: string $dsn |
setAPIKey( $key ) X-Ref |
sets YOUR Google Map API key param: string $key |
setWidth( $width ) X-Ref |
sets the width of the map param: string $width |
setHeight( $height ) X-Ref |
sets the height of the map param: string $height |
setZoomLevel( $level ) X-Ref |
sets the default map zoom level param: string $level |
enableMapControls() X-Ref |
enables the map controls (zoom/move) |
disableMapControls() X-Ref |
disables the map controls (zoom/move) |
setControlSize( $size ) X-Ref |
sets the map control size (large/small) param: string $size |
enableTypeControls() X-Ref |
enables the type controls (map/satellite/hybrid) |
disableTypeControls() X-Ref |
disables the type controls (map/satellite/hybrid) |
setMapType( $type ) X-Ref |
set default map type (map/satellite/hybrid) |
enableOnLoad() X-Ref |
enables onload |
disableOnLoad() X-Ref |
disables onload |
enableSidebar() X-Ref |
enables sidebar |
disableSidebar() X-Ref |
disables sidebar |
enablePointlist() X-Ref |
enables pointlist |
disablePointlist() X-Ref |
disables sidebar |
enableDirections() X-Ref |
enables map directions inside info window |
disableDirections() X-Ref |
disables map directions inside info window |
setBrowserAlert( $message ) X-Ref |
set browser alert message for incompatible browsers |
setJSAlert( $message ) X-Ref |
set <noscript> message when javascript is disabled |
enableInfoWindow() X-Ref |
enable map marker info windows |
disableInfoWindow() X-Ref |
disable map marker info windows |
setInfoWindowTrigger( $type ) X-Ref |
set the info window trigger action |
enableZoomEncompass() X-Ref |
enable zoom to encompass makers |
disableZoomEncompass() X-Ref |
disable zoom to encompass makers |
enableZoomWheel() X-Ref |
enable zoom using a mouse's scroll wheel. |
disableZoomWheel() X-Ref |
disable zoom using a mouse's scroll wheel. |
setBoundsFudge( $val ) X-Ref |
set the boundary fudge factor |
enableScaleControl() X-Ref |
enables the scale map control |
disableScaleControl() X-Ref |
disables the scale map control |
enableOverviewControl() X-Ref |
enables the overview map control |
disableOverviewControl() X-Ref |
disables the overview map control |
setLookupService( $service ) X-Ref |
set the lookup service to use for geocode lookups default is YAHOO, you can also use GOOGLE. NOTE: GOOGLE can to intl lookups, but is not an official API, so use at your own risk. |
addMarkerByAddress( $address, $title = '', $html = '', $tooltip = '' ) X-Ref |
adds a map marker by address param: string $address the map address to mark (street/city/state/zip) param: string $title the title display in the sidebar param: string $html the HTML block to display in the info bubble (if empty, title is used) |
addMarkerByCoords( $lon, $lat, $title = '', $html = '', $tooltip = '' ) X-Ref |
adds a map marker by geocode param: string $lon the map longitude (horizontal) param: string $lat the map latitude (vertical) param: string $title the title display in the sidebar param: string $html |array $html |
addPolyLineByAddress( $address1, $address2, $color = '', $weight = 0, $opacity = 0 ) X-Ref |
adds a map polyline by address if color, weight and opacity are not defined, use the google maps defaults param: string $address1 the map address to draw from param: string $address2 the map address to draw to param: string $color the color of the line (format: #000000) param: string $weight the weight of the line in pixels param: string $opacity the line opacity (percentage) |
addPolyLineByCoords( $lon1, $lat1, $lon2, $lat2, $color = '', $weight = 0, $opacity = 0 ) X-Ref |
adds a map polyline by map coordinates if color, weight and opacity are not defined, use the google maps defaults param: string $lon1 the map longitude to draw from param: string $lat1 the map latitude to draw from param: string $lon2 the map longitude to draw to param: string $lat2 the map latitude to draw to param: string $color the color of the line (format: #000000) param: string $weight the weight of the line in pixels param: string $opacity the line opacity (percentage) |
adjustCenterCoords( $lon, $lat ) X-Ref |
adjust map center coordinates by the given lat/lon point param: string $lon the map latitude (horizontal) param: string $lat the map latitude (vertical) |
setCenterCoords( $lon, $lat ) X-Ref |
set map center coordinates to lat/lon point param: string $lon the map latitude (horizontal) param: string $lat the map latitude (vertical) |
createMarkerIcon( $iconImage, $iconShadowImage = '', $iconAnchorX = 'x', $iconAnchorY = 'x', $infoWindowAnchorX = 'x', $infoWindowAnchorY = 'x' ) X-Ref |
generate an array of params for a new marker icon image iconShadowImage is optional If anchor coords are not supplied, we use the center point of the image by default. Can be called statically. For private use by addMarkerIcon() and setMarkerIcon() Uses icon cache to speed up marker image handling param: string $iconImage URL to icon image param: string $iconShadowImage URL to shadow image param: string $iconAnchorX X coordinate for icon anchor point param: string $iconAnchorY Y coordinate for icon anchor point param: string $infoWindowAnchorX X coordinate for info window anchor point param: string $infoWindowAnchorY Y coordinate for info window anchor point |
setMarkerIcon( $iconImage, $iconShadowImage = '', $iconAnchorX = 'x', $iconAnchorY = 'x', $infoWindowAnchorX = 'x', $infoWindowAnchorY = 'x' ) X-Ref |
set the marker icon for ALL markers on the map |
addMarkerIcon( $iconImage, $iconShadowImage = '', $iconAnchorX = 'x', $iconAnchorY = 'x', $infoWindowAnchorX = 'x', $infoWindowAnchorY = 'x' ) X-Ref |
add an icon to go with the correspondingly added marker |
printHeaderJS() X-Ref |
print map header javascript (goes between <head></head>) |
getHeaderJS() X-Ref |
return map header javascript (goes between <head></head>) |
printOnLoad() X-Ref |
prints onLoad() without having to manipulate body tag. call this after the print map like so... $map->printMap(); $map->printOnLoad(); |
getOnLoad() X-Ref |
return js to set onload function |
printMapJS() X-Ref |
print map javascript (put just before </body>, or in <header> if using onLoad()) |
getMapJS() X-Ref |
return map javascript |
getAddMarkersJS() X-Ref |
overridable function for generating js to add markers |
getPolylineJS() X-Ref |
overridable function to generate polyline js |
getCreateMarkerJS() X-Ref |
overridable function to generate the js for the js function for creating a marker. |
printMap() X-Ref |
print map (put at location map will appear) |
getMap() X-Ref |
return map |
printSidebar() X-Ref |
print sidebar (put at location sidebar will appear) |
getSidebar() X-Ref |
return sidebar html |
getGeocode( $address ) X-Ref |
get the geocode lat/lon points from given address look in cache first, otherwise get from Yahoo param: string $address |
getCache( $address ) X-Ref |
get the geocode lat/lon points from cache for given address param: string $address |
putCache( $address, $lon, $lat ) X-Ref |
put the geocode lat/lon points into cache for given address param: string $address param: string $lon the map latitude (horizontal) param: string $lat the map latitude (vertical) |
geoGetCoords($address,$depth=0) X-Ref |
get geocode lat/lon points for given address from Yahoo param: string $address |
fetchURL( $url ) X-Ref |
fetch a URL. Override this method to change the way URLs are fetched. param: string $url |
geoGetDistance( $lat1, $lon1, $lat2, $lon2, $unit = 'M' ) X-Ref |
get distance between to geocoords using great circle distance formula param: float $lat1 param: float $lat2 param: float $lon1 param: float $lon2 param: float $unit M=miles, K=kilometers, N=nautical miles, I=inches, F=feet |
geoGetDistanceInKM( $lat1, $lon1, $lat2, $lon2 ) X-Ref |
get distance between two geocoords using great circle distance formula and return in kilometer (KM) param: float $lat1 param: float $lat2 param: float $lon1 param: float $lon2 |
Generated: Sun Jan 29 16:31:14 2012 | Cross-referenced by PHPXref 0.7.1 |