PHP Reference

Map

PropertyTypeDescription
Plug-in options
id string If plug-in ID is not set an ID will be calculated.
fitBoundsOnLoad boolean Sets the viewport to contain the current bounds on load.
closeAllInfoWindowsOnMapClick boolean Event trigger which close all info windows on map click.
Object options of google.maps.MapOptions
See the Google Maps API site for detail description.
backgroundColor string  
center string|\AdGrafik\GoogleMapsPHP\API\Base\LatLng  
disableDefaultUI boolean  
disableDoubleClickZoom boolean  
draggable boolean  
draggableCursor string  
draggingCursor string  
heading integer  
keyboardShortcuts boolean  
mapMaker boolean  
mapTypeControl boolean  
mapTypeControlOptions array|\AdGrafik\GoogleMapsPHP\API\Controls\MapTypeControlOptions

 

 
mapTypeId string<\AdGrafik\GoogleMapsPHP\API\Map\MapTypeId::HYBRID|ROADMAP|SATELLITE|TERRAIN> $mapTypeId  
maxZoom integer  
minZoom integer  
noClear boolean  
overviewMapControl boolean  
overviewMapControlOptions array|\AdGrafik\GoogleMapsPHP\API\Controls\OverviewMapControlOptions  
panControl boolean  
panControlOptions array|\AdGrafik\GoogleMapsPHP\API\Controls\PanControlOptions  
rotateControl boolean  
rotateControlOptions array|\AdGrafik\GoogleMapsPHP\API\Controls\RotateControlOptions  
scaleControl boolean  
scaleControlOptions array|\AdGrafik\GoogleMapsPHP\API\Controls\ScaleControlOptions  
scrollwheel boolean  
streetView

Not supportet

streetViewControl boolean  
streetViewControlOptions array|\AdGrafik\GoogleMapsPHP\API\Controls\StreetViewControlOptions  
tilt integer  
zoom integer  
zoomControl boolean  
zoomControlOptions array|\AdGrafik\GoogleMapsPHP\API\Controls\ZoomControlOptions  

Marker

PropertyTypeDescription
Plug-in options
id string If plug-in ID is not set an ID will be calculated.
Object options of google.maps.MarkerOptions
See the Google Maps API site for detail description.
anchorPoint array|\AdGrafik\GoogleMapsPHP\API\Base\Point  
animation string<\AdGrafik\GoogleMapsPHP\API\Overlays\Animation::BOUNCE|DROP>  
clickable boolean  
cursor string  
draggable boolean  
flat boolean  
icon string|array|\AdGrafik\GoogleMapsPHP\API\Overlays\Icon|\AdGrafik\GoogleMapsPHP\API\Overlays\Symbol  
map

Not supported

optimized boolean  
position string|\AdGrafik\GoogleMapsPHP\API\Base\LatLng  
raiseOnDrag boolean  
crossOnDrag boolean  
shadow string|array|\AdGrafik\GoogleMapsPHP\API\Overlays\Icon|\AdGrafik\GoogleMapsPHP\API\Overlays\Symbol  
shape array|\AdGrafik\GoogleMapsPHP\API\Overlays\MarkerShape  
title string  
visible boolean  
zIndex integer  
Builder options
infoWindow array InfoWindow options array.
*OptionSplit string OptionSplit function. Splitting data: position. Splitting properties: *

MarkerClusterer

PropertyTypeDescription
Plug-in options
id string If plug-in ID is not set an ID will be calculated.
Object options of MarkerClustererOptions
See the MarkerClusterer site for detail description.
gridSize integer  
maxZoom integer  
styles array<array>|array<\AdGrafik\GoogleMapsPHP\AddOns\MarkerClusterer\API\MapTypes\MarkerClustererStyle>  

Can't be used if viewport is enabled!


InfoWindow

PropertyTypeDescription
Plug-in options
id string If plug-in ID is not set an ID will be calculated.
anchor string ID of the marker plug-in.
opened boolean If TRUE, info window will be opend on initialization.
closeOnClickAgain boolean If TRUE, info window will be closed, if anchor clicked again.
keepOpen boolean If TRUE, info window will stay open even if closeAllInfoWindowsOnMapClick is set to TRUE.
Object options of google.maps.InfoWindowOptions
See the Google Maps API site for detail description.
content string  
disableAutoPan boolean  
maxWidth integer  
pixelOffset array|\AdGrafik\GoogleMapsPHP\API\Base\Size  
position string|\AdGrafik\GoogleMapsPHP\API\Base\LatLng  
zIndex integer  
Builder options
*OptionSplit string OptionSplit function. Splitting data: position. Splitting properties: *

Polygon

PropertyTypeDescription
Plug-in options
id string If plug-in ID is not set an ID will be calculated.
Object options of google.maps.PolygonOptions
See the Google Maps API site for detail description.
clickable boolean  
draggable boolean  
editable boolean  
fillColor string  
fillOpacity integer  
geodesic boolean  
map

Not supported

paths array<string>|array<\AdGrafik\GoogleMapsPHP\API\Base\LatLng>

At this time the polygon supports only one shape for paths.

strokeColor string  
strokeOpacity integer  
strokePosition string<\AdGrafik\GoogleMapsPHP\API\Overlays\StrokePosition::CENTER|NSIDE|OUTSIDE>  
strokeWeight integer  
visible boolean  
zIndex integer  
Builder options
infoWindow array InfoWindow options array.
If the position of the info window is not set the info window will be placed on the center of the shape.
If position value is an instance of LatLng or a string containing a "," it must be an explicit position, else if it is a integer greater 0 the position will be the defined angle of the shape.
marker array Marker options array.
*OptionSplit string OptionSplit function. Splitting data: paths. Splitting properties: infoWindow, marker

Polyline

PropertyTypeDescription
Plug-in options
id string If plug-in ID is not set an ID will be calculated.
Object options of google.maps.PolylineOptions
See the Google Maps API site for detail description.
clickable boolean  
draggable boolean  
editable boolean  
geodesic boolean  
icons array<array>|array<string>|array<\AdGrafik\GoogleMapsPHP\API\Overlays\Icon>  
map

Not supported

path array<string>|array<\AdGrafik\GoogleMapsPHP\API\Base\LatLng>  
strokeColor string  
strokeOpacity integer  
strokeWeight integer  
visible boolean  
zIndex integer  
Builder options
infoWindow array InfoWindow options array.
If the position of the info window is not set the info window will be placed on the center of the shape.
If position value is an instance of LatLng or a string containing a "," it must be an explicit position, else if it is a integer greater 0 the position will be the defined angle of the shape.
marker array Marker options array.
*OptionSplit string OptionSplit function. Splitting data: path. Splitting properties: infoWindow, marker

Rectangle

PropertyTypeDescription
Plug-in options
id string If plug-in ID is not set an ID will be calculated.
Object options of google.maps.RectangleOptions
See the Google Maps API site for detail description.
bounds string|array|\AdGrafik\GoogleMapsPHP\API\Base\LatLngBounds  
clickable boolean  
draggable boolean  
editable boolean  
fillColor string  
fillOpacity integer  
map

Not supported

strokeColor string  
strokeOpacity integer  
strokePosition string<\AdGrafik\GoogleMapsPHP\API\Overlays\StrokePosition::CENTER|NSIDE|OUTSIDE>  
strokeWeight integer  
visible boolean  
zIndex integer  
Builder options
infoWindow array InfoWindow options array.
If the position of the info window is not set the info window will be placed on the center of the shape.
If position value is an instance of LatLng or a string containing a "," it must be an explicit position, else if it is a integer greater 0 the position will be the defined angle of the shape.
*OptionSplit string OptionSplit function. Splitting data: path. Splitting properties: infoWindow, marker

Circle

PropertyTypeDescription
Plug-in options
id string If plug-in ID is not set an ID will be calculated.
Object options of google.maps.CircleOptions
See the Google Maps API site for detail description.
center string|\AdGrafik\GoogleMapsPHP\API\Base\LatLng  
clickable boolean  
draggable boolean  
editable boolean  
fillColor string  
fillOpacity integer  
map

Not supported

radius integer  
strokeColor string  
strokeOpacity integer  
strokePosition string<\AdGrafik\GoogleMapsPHP\API\Overlays\StrokePosition::CENTER|NSIDE|OUTSIDE>  
strokeWeight integer  
visible boolean  
zIndex integer  
Builder options
infoWindow array InfoWindow options array.
If the position of the info window is not set the info window will be placed on the center of the shape.
If position value is an instance of LatLng or a string containing a "," it must be an explicit position, else if it is a integer greater 0 the position will be the defined angle of the shape.
*OptionSplit string OptionSplit function. Splitting data: path. Splitting properties: infoWindow, marker

StyledMapType

PropertyTypeDescription
Plug-in options
id string If plug-in ID is not set an ID will be calculated.
showOnInitialize boolean If set, the map style will be shown after initialization.
Object options of google.maps.StyledMapTypeOptions
See the Google Maps API site for detail description.
alt string  
maxZoom integer  
minZoom integer  
name string  
Builder options
styles array<array>|array<\AdGrafik\GoogleMapsPHP\API\MapTypes\MapTypeStyle> Array of options of google.maps.MapTypeStyle
See the Google Maps API site for detail description.

KmlLayer

PropertyTypeDescription
Plug-in options
id string If plug-in ID is not set an ID will be calculated.
Object options of google.maps.KmlLayerOptions
See the Google Maps API site for detail description.
clickable boolean  
map

Not supported

preserveViewport boolean  
suppressInfoWindows boolean  
url string  

Google Maps KML layers accepts no local URLs.

Can't be used if viewport is enabled.


Loader

PropertyTypeDescription
Plug-in options
id string In this case the plug-in ID is required to avoid collision with loaded plug-in IDs.
url string The URL to load.
parameters array Additional parameters.
viewportManagement boolean If set, the viewport management will be activated.
viewportOffset float The offset to the map viewport bounds. Default .5.

DrawingManager

PropertyTypeDescription
Plug-in options
id string If plug-in ID is not set an ID will be calculated.
Object options of google.maps.PolygonOptions
See the Google Maps API site for detail description.
drawingMode string<\AdGrafik\GoogleMapsPHP\API\Drawing\OverlayType::MARKER|CIRCLE|POLYGON|POLYLINE|RECTANGLE>  
drawingControl boolean  
drawingControlOptions array|\AdGrafik\GoogleMapsPHP\API\Drawing\DrawingControlOptions  
markerOptions array|\AdGrafik\GoogleMapsPHP\API\Overlay\MarkerOptions  
map

Not supported

circleOptions array|\AdGrafik\GoogleMapsPHP\API\Overlay\CircleOptions  
polygonOptions array|\AdGrafik\GoogleMapsPHP\API\Overlay\PolygonOptions  
polylineOptions array|\AdGrafik\GoogleMapsPHP\API\Overlay\PolylineOptions  
rectangleOptions array|\AdGrafik\GoogleMapsPHP\API\Overlay\RectangleOptions  

HTML output

PropertyDescription
PlugInProvider
printJavaScriptJsonObject() Prints only the JSON object with the plug-in array.
sendJson() Prints complete JSON object to use with an AJAX request including header.
MapBuilder
printHtmlCanvas() Prints the Google Maps canvas tag.
printHtmlHead() Prints all tags (jQuery, Google Maps API, MapBuilder, Options) defined in the head view.
printHtmlBody() Prints all tags (Google Maps canvas) defined in the body view.
printHtml() Prints all tags defined in the head and body view.
printJavaScriptOptionsVariableName() Prints the options variable name (e.g. GoogleMapsPhpOptionsMap1).
printJavaScriptOptions() Prints the options declaration (e.g. var GoogleMapsPhpOptionsMap1 = {…};).
printJavaScriptConstructionVariableName() Prints construction variable name (e.g. GoogleMapsPhpMap1).
printJavaScriptConstruction() Prints construction declaration (e.g. google.maps.event.addDomListener(window, 'load', function(){ GoogleMapsPhpMap1 = new GoogleMapsPHP.MapBuilder( GoogleMapsPhpOptionsMap1 ); });).
__toString() Alias of printHtml().

Configuration

PropertyTypeDefaultDescription
debug boolean FALSE If set TRUE options will be printed in a readable format.
mapBuilder.canvas.tagName string div  
mapBuilder.canvas.attributes.style string height: 300px;  
mapBuilder.canvas.forceOnTop boolean TRUE  
mapBuilder.options.wrap array 0: google.maps.event.addDomListener(window, 'load', function(){
1: });
DOM ready function
mapBuilder.view array includeJavaScriptLibrary:
  googleMapsApi:
    source: http://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false
    forceOnTop: TRUE
    external: TRUE

includeJavaScriptSource:
  mapBuilder:
    source: GoogleMapsPHP/Ressources/Public/JavaScript/mapbuilder-1.0.0.js
-> view
plugInBuilder.Loader.className string AdGrafik\GoogleMapsPHP\PlugIns\Loader\Builder Add user defined builders if you want. methodName is by default "build".
plugInBuilder.Loader.view array includeJavaScriptLibrary:
  jQuery:
    source: http://code.jquery.com/jquery-1.10.1.min.js
    forceOnTop: TRUE
    external: TRUE
-> view
plugInBuilder.Map.className string AdGrafik\GoogleMapsPHP\PlugIns\Map\Builder  
plugInBuilder.Map.arguments.0 array center: 48.208202, 16.373749
mapTypeId: AdGrafik\GoogleMapsPHP\API\Map\MapTypeId::ROADMAP
zoom: 7
Set default options like the parameters set for plug-in builder.
plugInBuilder.StyledMapType.className string AdGrafik\GoogleMapsPHP\PlugIns\StyledMapType\Builder  
plugInBuilder.Marker.className string AdGrafik\GoogleMapsPHP\PlugIns\Marker\Builder  
plugInBuilder.InfoWindow.className string AdGrafik\GoogleMapsPHP\PlugIns\InfoWindow\Builder  
plugInBuilder.Polyline.className string AdGrafik\GoogleMapsPHP\PlugIns\Polyline\Builder  
plugInBuilder.Polygon.className string AdGrafik\GoogleMapsPHP\PlugIns\Polygon\Builder  
plugInBuilder.KmlLayer.className string AdGrafik\GoogleMapsPHP\PlugIns\KmlLayer\Builder  
plugInBuilder.MarkerClusterer.className string AdGrafik\GoogleMapsPHP\PlugIns\MarkerClusterer\Builder  
plugInBuilder.MarkerClusterer.view array includeJavaScriptLibrary:
  markerClusterer:
    source: GoogleMapsPHP/Ressources/Public/JavaScript/markerclusterer-1.0.0.min.js
    forceOnTop: TRUE
-> view
plugInProvider.errorHandler.className string AdGrafik\GoogleMapsPHP\DataProvider Error and exception handler for AJAX requests.
plugInProvider.errorHandler.methodName string errorHandler  
plugInProvider.exceptionHandler.className string AdGrafik\GoogleMapsPHP\DataProvider  
plugInProvider.exceptionHandler.methodName string exceptionHandler  

view

PropertyTypeDefaultDescription
node.document.xmlVersion string 1.0 Settings for the HTML output.
node.document.xmlEncoding string utf-8  
includeJavaScriptLibrary array   -> view.includeJavaScriptLibrary
includeJavaScriptSource array   -> view.includeJavaScriptSource
includeJavaScriptInline array   -> view.includeJavaScriptInline

view.includeJavaScriptLibrary
view.includeJavaScriptSource
view.includeJavaScriptInline

PropertyTypeDefaultDescription
source string   File reference or JavaScript code.
forceOnTop boolean TRUE  
external boolean FALSE If TRUE, file reference is an external file.