Maps

Extends \Joomla\Google\Embed

Google Maps embed class for the Joomla Framework.

deprecated
since

1.0

deprecated

The joomla/google package is deprecated

Methods

__construct

Constructor.

__construct(array $options = array(), \Joomla\Uri\Uri $uri = null) 
inherited
since

1.0

Arguments

$options

arrayGoogle options object

$uri

\Joomla\Uri\UriURL of the page being rendered

addMarker

Add a marker to the map

addMarker(mixed $location, mixed $title = null, array $options = array()) : mixed
since

1.0

Arguments

$location

mixedA latitude longitude array or an address string

$title

mixedThe hover-text for the marker

$options

arrayOptions for marker

Response

mixedThe marker or false on failure

deleteMarker

Delete a marker from the map

deleteMarker(integer $index = null) : array
since

1.0

throws

\OutOfBoundsException

Arguments

$index

integerIndex of marker to delete (defaults to last added marker)

Response

arrayThe latitude/longitude of the deleted marker

echoBody

Method to output the body for the API

echoBody() : void
inherited
since

1.0

echoHeader

Method to output the javascript header for the embed API

echoHeader() : void
inherited
since

1.0

geocodeAddress

Method to get the location information back from an address

geocodeAddress(string $address) : array
since

1.0

throws

\RuntimeException

Arguments

$address

stringThe address to geocode

Response

arrayAn array containing Google's geocode data

getAdditionalJavascript

Method to get additional map options

getAdditionalJavascript() : string
since

1.0

Response

stringThe options

getAdditionalMapOptions

Method to get additional map options

getAdditionalMapOptions() : string
since

1.0

Response

stringThe options

getAsyncCallback

Method to get callback function for async javascript loading

getAsyncCallback() : string
since

1.0

Response

stringThe ID

getAutoload

Checks how the script should be loaded

getAutoload() : string
since

1.0

Response

stringAutoload type (onload, jquery, mootools, or false)

getBody

Method to retrieve the body for the API

getBody() : string
inherited abstract
since

1.0

Response

stringThe body

getCenter

Method to set the center of the map

getCenter() : mixed
since

1.0

Response

mixedA latitude longitude array or an address string

getHeader

Method to retrieve the header for the API

getHeader() : string
inherited abstract
since

1.0

Response

stringThe header

getKey

Method to get the API key

getKey() : string
since

1.0

Response

stringThe Google Maps API key

getMapClass

Method to get the class of the map div

getMapClass() : string
since

1.0

Response

stringThe class

getMapId

Method to get the id of the map div

getMapId() : string
since

1.0

Response

stringThe ID

getMapStyle

Method to get the style of the map div

getMapStyle() : string
since

1.0

Response

stringThe style

getMapType

Method to get the map type setting

getMapType() : string
since

1.0

Response

stringThe class

getOption

Get an option from the Embed instance.

getOption(string $key) : mixed
inherited
since

1.0

Arguments

$key

stringThe name of the option to get.

Response

mixedThe option value.

getZoom

Method to get the zoom

getZoom() : integer
since

1.0

Response

integerThe zoom level

hasSensor

Checks if a sensor is set to be required

hasSensor() : boolean
since

1.0

Response

booleanTrue if asynchronous

isAsync

Checks if the javascript is set to be asynchronous

isAsync() : boolean
since

1.0

Response

booleanTrue if asynchronous

isSecure

Method to retrieve the javascript header for the embed API

isSecure() : string
inherited
since

1.0

Response

stringThe header

listMarkers

List the markers added to the map

listMarkers() : array
since

1.0

Response

arrayA list of markers

noSensor

Don't require access to sensor data

noSensor() : \Joomla\Google\Embed\Maps
since

1.0

Response

\Joomla\Google\Embed\MapsThe object for method chaining

setAdditionalJavascript

Method to add additional javascript

setAdditionalJavascript(array $script) : \Joomla\Google\Embed\Maps
since

1.0

Arguments

$script

arrayAdditional javascript

Response

\Joomla\Google\Embed\MapsThe object for method chaining

setAdditionalMapOptions

Method to add additional map options

setAdditionalMapOptions(array $options) : \Joomla\Google\Embed\Maps
since

1.0

Arguments

$options

arrayAdditional map options

Response

\Joomla\Google\Embed\MapsThe object for method chaining

setAsyncCallback

Method to set the callback function for async javascript loading

setAsyncCallback(string $callback) : \Joomla\Google\Embed\Maps
since

1.0

Arguments

$callback

stringThe callback function name

Response

\Joomla\Google\Embed\MapsThe object for method chaining

setAutoload

Automatically add the callback to the window

setAutoload(string $type = 'onload') : \Joomla\Google\Embed\Maps
since

1.0

Arguments

$type

stringThe method to add the callback (options are onload, jquery, mootools, and false)

Response

\Joomla\Google\Embed\MapsThe object for method chaining

setCenter

Method to set the center of the map

setCenter(mixed $location, mixed $title = true, array $markeroptions = array()) : \Joomla\Google\Embed\Maps
since

1.0

Arguments

$location

mixedA latitude/longitude array or an address string

$title

mixedTitle of marker or false for no marker

$markeroptions

arrayOptions for marker

Response

\Joomla\Google\Embed\MapsThe latitude/longitude of the center or false on failure

setKey

Method to set the API key

setKey(string $key) : \Joomla\Google\Embed\Maps
since

1.0

Arguments

$key

stringThe Google Maps API key

Response

\Joomla\Google\Embed\MapsThe object for method chaining

setMapClass

Method to set the map div class

setMapClass(string $class) : \Joomla\Google\Embed\Maps
since

1.0

Arguments

$class

stringThe class

Response

\Joomla\Google\Embed\MapsThe object for method chaining

setMapId

Method to set the map div id

setMapId(string $id) : \Joomla\Google\Embed\Maps
since

1.0

Arguments

$id

stringThe ID

Response

\Joomla\Google\Embed\MapsThe object for method chaining

setMapStyle

Method to set the map div style

setMapStyle(string $style) : \Joomla\Google\Embed\Maps
since

1.0

Arguments

$style

stringThe style

Response

\Joomla\Google\Embed\MapsThe object for method chaining

setMapType

Method to set the map type ()

setMapType(string $type) : \Joomla\Google\Embed\Maps
since

1.0

Arguments

$type

stringValid types are ROADMAP, SATELLITE, HYBRID, and TERRAIN

Response

\Joomla\Google\Embed\MapsThe object for method chaining

setOption

Set an option for the Embed instance.

setOption(string $key, mixed $value) : \Joomla\Google\Embed
inherited
since

1.0

Arguments

$key

stringThe name of the option to set.

$value

mixedThe option value to set.

Response

\Joomla\Google\EmbedThis object for method chaining.

setZoom

Method to set the map zoom

setZoom(integer $zoom) : \Joomla\Google\Embed\Maps
since

1.0

Arguments

$zoom

integerZoom level (0 is whole world)

Response

\Joomla\Google\Embed\MapsThe object for method chaining

useAsync

Load javascript asynchronously

useAsync() : \Joomla\Google\Embed\Maps
since

1.0

Response

\Joomla\Google\Embed\MapsThe object for method chaining

useSensor

Require access to sensor data

useSensor() : \Joomla\Google\Embed\Maps
since

1.0

Response

\Joomla\Google\Embed\MapsThe object for method chaining

useSync

Load javascript synchronously

useSync() : \Joomla\Google\Embed\Maps
since

1.0

Response

\Joomla\Google\Embed\MapsThe object for method chaining

Properties

http

The HTTP client object to use in sending HTTP requests.

since

1.0

Type(s)

\Joomla\Http\Http

options

Options for the Google data object.

inherited
since

1.0

Type(s)

array

uri

URI of the page being rendered.

inherited
since

1.0

Type(s)

\Joomla\Uri\Uri