public
|
|
public
string
|
#
getKey( )
Method to get the API key
Method to get the API key
Returns
string - The Google Maps API key
Since
12.3
|
public
JGoogleEmbedMaps
|
#
setKey( string $key )
Method to set the API key
Method to set the API key
Parameters
- $key
string - $key The Google Maps API key
Returns
Since
12.3
|
public
string
|
#
getMapId( )
Method to get the id of the map div
Method to get the id of the map div
Returns
string - The ID
Since
12.3
|
public
JGoogleEmbedMaps
|
#
setMapId( string $id )
Method to set the map div id
Method to set the map div id
Parameters
Returns
Since
12.3
|
public
string
|
#
getMapClass( )
Method to get the class of the map div
Method to get the class of the map div
Returns
string - The class
Since
12.3
|
public
JGoogleEmbedMaps
|
#
setMapClass( string $class )
Method to set the map div class
Method to set the map div class
Parameters
- $class
string - $class The class
Returns
Since
12.3
|
public
string
|
#
getMapStyle( )
Method to get the style of the map div
Method to get the style of the map div
Returns
string - The style
Since
12.3
|
public
JGoogleEmbedMaps
|
#
setMapStyle( string $style )
Method to set the map div style
Method to set the map div style
Parameters
- $style
string - $style The style
Returns
Since
12.3
|
public
string
|
#
getMapType( )
Method to get the map type setting
Method to get the map type setting
Returns
string - The class
Since
12.3
|
public
JGoogleEmbedMaps
|
#
setMapType( string $type )
Method to set the map type ()
Method to set the map type ()
Parameters
- $type
string - $type Valid types are ROADMAP, SATELLITE, HYBRID, and TERRAIN
Returns
Since
12.3
|
public
string
|
#
getAdditionalMapOptions( )
Method to get additional map options
Method to get additional map options
Returns
string - The options
Since
12.3
|
public
JGoogleEmbedMaps
|
#
setAdditionalMapOptions( array $options )
Method to add additional map options
Method to add additional map options
Parameters
- $options
array - $options Additional map options
Returns
Since
12.3
|
public
string
|
#
getAdditionalJavascript( )
Method to get additional map options
Method to get additional map options
Returns
string - The options
Since
12.3
|
public
JGoogleEmbedMaps
|
#
setAdditionalJavascript( array $script )
Method to add additional javascript
Method to add additional javascript
Parameters
- $script
array - $script Additional javascript
Returns
Since
12.3
|
public
integer
|
#
getZoom( )
Method to get the zoom
Returns
integer - The zoom level
Since
12.3
|
public
JGoogleEmbedMaps
|
#
setZoom( integer $zoom )
Method to set the map zoom
Method to set the map zoom
Parameters
- $zoom
integer - $zoom Zoom level (0 is whole world)
Returns
Since
12.3
|
public
mixed
|
#
getCenter( )
Method to set the center of the map
Method to set the center of the map
Returns
mixed - A latitude longitude array or an address string
Since
12.3
|
public
JGoogleEmbedMaps
|
#
setCenter( mixed $location, mixed $title = true, array $markeroptions = array(), array $markerevents = array() )
Method to set the center of the map
Method to set the center of the map
Parameters
- $location
mixed - $location A latitude/longitude array or an address string
- $title
mixed - $title Title of marker or false for no marker
- $markeroptions
array - $markeroptions Options for marker
- $markerevents
array - $markerevents Events for marker
Returns
Since
12.3
Example
with events call: $map->setCenter( array(0, 0), 'Map Center', array(), array(
'click' => 'function() { // code goes here } ) )
|
public
JGoogleEmbedMaps
|
#
addEventHandler( string $type, string $function )
Method to add an event handler to the map. Event handlers must be passed in
either as callback name or fully qualified function declaration
Method to add an event handler to the map. Event handlers must be passed in
either as callback name or fully qualified function declaration
Parameters
- $type
string - $type The event name
- $function
string - $function The event handling function body
Returns
Since
12.3
Example
to add an event call: $map->addEventHandler('click', 'function(){ alert("map
click event"); }');
|
public
string
|
#
deleteEventHandler( string $type = null )
Method to remove an event handler from the map
Method to remove an event handler from the map
Parameters
- $type
string - $type The event name
Returns
string - The event handler content
Since
12.3
Example
to delete an event call: $map->deleteEventHandler('click');
|
public
array
|
#
listEventHandlers( )
List the events added to the map
List the events added to the map
Returns
array - A list of events
Since
12.3
|
public
mixed
|
#
addMarker( mixed $location, mixed $title = null, array $options = array(), array $events = array() )
Add a marker to the map
Parameters
- $location
mixed - $location A latitude/longitude array or an address string
- $title
mixed - $title The hover-text for the marker
- $options
array - $options Options for marker
- $events
array - $events Events for marker
Returns
mixed - The marker or false on failure
Since
12.3
Example
with events call: $map->addMarker( array(0, 0), 'My Marker', array(), array(
'click' => 'function() { // code goes here } ) )
|
public
array
|
#
listMarkers( )
List the markers added to the map
List the markers added to the map
Returns
array - A list of markers
Since
12.3
|
public
array
|
#
deleteMarker( integer $index = null )
Delete a marker from the map
Delete a marker from the map
Parameters
- $index
integer - $index Index of marker to delete (defaults to last added marker)
Returns
array - The latitude/longitude of the deleted marker
Since
12.3
|
public
boolean
|
#
isAsync( )
Checks if the javascript is set to be asynchronous
Checks if the javascript is set to be asynchronous
Returns
boolean - True if asynchronous
Since
12.3
|
public
JGoogleEmbedMaps
|
#
useAsync( )
Load javascript asynchronously
Load javascript asynchronously
Returns
Since
12.3
|
public
JGoogleEmbedAMaps
|
#
useSync( )
Load javascript synchronously
Load javascript synchronously
Returns
JGoogleEmbedAMaps - The object for method chaining
Since
12.3
|
public
string
|
#
getAsyncCallback( )
Method to get callback function for async javascript loading
Method to get callback function for async javascript loading
Returns
string - The ID
Since
12.3
|
public
JGoogleEmbedMaps
|
#
setAsyncCallback( string $callback )
Method to set the callback function for async javascript loading
Method to set the callback function for async javascript loading
Parameters
- $callback
string - $callback The callback function name
Returns
Since
12.3
|
public
boolean
|
#
hasSensor( )
Checks if a sensor is set to be required
Checks if a sensor is set to be required
Returns
boolean - True if asynchronous
Since
12.3
|
public
JGoogleEmbedMaps
|
#
useSensor( )
Require access to sensor data
Require access to sensor data
Returns
Since
12.3
|
public
JGoogleEmbedAMaps
|
#
noSensor( )
Don't require access to sensor data
Don't require access to sensor data
Returns
JGoogleEmbedAMaps - The object for method chaining
Since
12.3
|
public
string
|
#
getAutoload( )
Checks how the script should be loaded
Checks how the script should be loaded
Returns
string - Autoload type (onload, jquery, mootools, or false)
Since
12.3
|
public
JGoogleEmbedAMaps
|
#
setAutoload( string $type = 'onload' )
Automatically add the callback to the window
Automatically add the callback to the window
Parameters
- $type
string - $type The method to add the callback (options are onload, jquery, mootools, and
false)
Returns
JGoogleEmbedAMaps - The object for method chaining
Since
12.3
|
public
string
|
#
getBody( )
Method to retrieve the div that the map is loaded into
Method to retrieve the div that the map is loaded into
Returns
string - The body
Since
12.3
|
public
array
|
#
geocodeAddress( string $address )
Method to get the location information back from an address
Method to get the location information back from an address
Parameters
- $address
string - $address The address to geocode
Returns
array - An array containing Google's geocode data
Since
12.3
|