NXGoogleMapsAPI Class Reference

List of all members.

Public Member Functions


Detailed Description

API-Class for accessing Google Maps


Member Function Documentation

NXGoogleMapsAPI::_getGMapInitCode (  ) 

Compiles the Javascript to initialize the map. Is automatically called, so do not call yourself.

NXGoogleMapsAPI::_initialize (  ) 

Initializes the standard values of the class. Is automatically called by the constructor.

NXGoogleMapsAPI::addAddress ( address,
htmlinfo,
setCenter = true 
)

Add an address-marker to the map. The address is resolved by the webbrowser. with the Google Geocoder.

Parameters:
string address which should be add. test with google maps
string HTML-Code which will be displayed when the user clicks the address
boolean Set the Center to this point(true) or not (false)

NXGoogleMapsAPI::addControl ( control  ) 

Adds a control to the map

Parameters:
control Control-Type. Allowed are the constants GLargeMapControl - a large pan/zoom control used on Google Maps. Appears in the top left corner of the map. GSmallMapControl - a smaller pan/zoom control used on Google Maps. Appears in the top left corner of the map. GSmallZoomControl - a small zoom control (no panning controls) used in the small map blowup windows used to display driving directions steps on Google Maps. GScaleControl - a map scale GMapTypeControl - buttons that let the user toggle between map types (such as Map and Satellite) GOverviewMapControl - a collapsible overview map in the corner of the screen

NXGoogleMapsAPI::addDragMarker ( longitude,
latitude 
)

Add a dragable marker to the map. Only one Drag-Marker is allowed!

Parameters:
integer $longitude Longitude of the point
integer $latitude Lattitude of the point

NXGoogleMapsAPI::addGeoPoint ( longitude,
latitude,
htmlinfo,
setCenter 
)

Add a geopoint to the map.

Parameters:
integer Longitude of the point
integer Latitude of the point
string HTML-Code which will be displayed when the user clicks the address
boolean Set the Center to this point(true) or not (false)

NXGoogleMapsAPI::getBodyCode (  ) 

Get the BodyCode and draw the map.

Returns:
string Returns the code which is to be placed wight the <body>-tags.

NXGoogleMapsAPI::getHeadCode (  ) 

Returns the HTML-Code, which must be placed within the <HEAD>-Tags of your page.

Returns:
string The Code for the <Head>-Tag

NXGoogleMapsAPI::getOnLoadCode (  ) 

Get the code, which must be passed to the <body>-attribute onLoad.

Returns:
string The onload Code

NXGoogleMapsAPI::NXGoogleMapsAPI ( apiKey = ""  ) 

Constructor

Parameters:
string $apiKey The Google Maps API-Key for your domain.

NXGoogleMapsAPI::setCenter ( x,
y 
)

Center the map to the coordinates

Parameters:
integer $x Longitude
integer $y Latitude

NXGoogleMapsAPI::setHeight ( height  ) 

Set the height of the map

Parameters:
integer $height The Height in pixels

NXGoogleMapsAPI::setWidth ( width  ) 

Set the width of the map

Parameters:
integer $width The Height in pixels

NXGoogleMapsAPI::setZoomFactor ( zoomFactor  ) 

Set the ZoomFactor The ZoomFactor is a value between 0 and 17

Parameters:
integer $zoomFactor Value of the Zoom-Factor