PHP Class dosamigos\google\maps\Map

Author: Antonio Ramirez ([email protected])
Inheritance: extends dosamigos\google\maps\ObjectAbstract
Show file Open project: 2amigos/yii2-google-maps-library Class Usage Examples

Public Properties

Property Type Description
$containerOptions the HTML attributes for the layer that will render the map.
$height the height in pixels or percent of the container holding the map.
$width the width in pixels or percent of the container holding the map.

Public Methods

Method Description
__construct ( array $config = [] )
addOverlay ( $overlay )
appendScript ( $js )
display ( ) : string
getBoundsFromCenterAndZoom ( ) : dosamigos\google\maps\LatLngBounds
getCenter ( ) : mixed
getClosureScopedVariable ( $name ) : mixed
getClosureScopedVariables ( ) : array
getJs ( ) : string
getMarkers ( ) : array
getMarkersCenterCoordinates ( ) : dosamigos\google\maps\LatLng | null
getMarkersFittingZoom ( integer $margin, integer $default = 14 ) : integer
getMarkersForUrl ( ) : string
getOverlays ( ) : array
getPlugins ( ) : dosamigos\google\maps\PluginManager
getStaticMapUrl ( string $maptype = 'mobile', string $hl = 'es' ) : string
init ( )
installPlugin ( dosamigos\google\maps\PluginAbstract $plugin ) Installs a plugin
registerClientScript ( integer $position = View::POS_END )
removePlugin ( $plugin ) : mixed | null Removes an installed plugin
renderContainer ( ) : string
setCenter ( dosamigos\google\maps\LatLng $coord )
setClosureScopedVariable ( $name, null $value = null )

Protected Methods

Method Description
getClosureScopedVariablesScript ( ) : string

Method Details

__construct() public method

public __construct ( array $config = [] )
$config array

addOverlay() public method

public addOverlay ( $overlay )
$overlay

appendScript() public method

public appendScript ( $js )
$js

display() public method

public display ( ) : string
return string

getBoundsFromCenterAndZoom() public method

public getBoundsFromCenterAndZoom ( ) : dosamigos\google\maps\LatLngBounds
return dosamigos\google\maps\LatLngBounds

getCenter() public method

public getCenter ( ) : mixed
return mixed

getClosureScopedVariable() public method

public getClosureScopedVariable ( $name ) : mixed
$name
return mixed

getClosureScopedVariables() public method

public getClosureScopedVariables ( ) : array
return array

getClosureScopedVariablesScript() protected method

getJs() public method

public getJs ( ) : string
return string

getMarkers() public method

public getMarkers ( ) : array
return array

getMarkersCenterCoordinates() public method

public getMarkersCenterCoordinates ( ) : dosamigos\google\maps\LatLng | null
return dosamigos\google\maps\LatLng | null

getMarkersFittingZoom() public method

public getMarkersFittingZoom ( integer $margin, integer $default = 14 ) : integer
$margin integer
$default integer
return integer

getMarkersForUrl() public method

public getMarkersForUrl ( ) : string
return string

getOverlays() public method

public getOverlays ( ) : array
return array

getPlugins() public method

public getPlugins ( ) : dosamigos\google\maps\PluginManager
return dosamigos\google\maps\PluginManager

getStaticMapUrl() public method

public getStaticMapUrl ( string $maptype = 'mobile', string $hl = 'es' ) : string
$maptype string
$hl string
return string

init() public method

public init ( )

installPlugin() public method

Installs a plugin
public installPlugin ( dosamigos\google\maps\PluginAbstract $plugin )
$plugin dosamigos\google\maps\PluginAbstract

registerClientScript() public method

public registerClientScript ( integer $position = View::POS_END )
$position integer

removePlugin() public method

Removes an installed plugin
public removePlugin ( $plugin ) : mixed | null
$plugin
return mixed | null

renderContainer() public method

public renderContainer ( ) : string
return string

setCenter() public method

public setCenter ( dosamigos\google\maps\LatLng $coord )
$coord dosamigos\google\maps\LatLng

setClosureScopedVariable() public method

public setClosureScopedVariable ( $name, null $value = null )
$name
$value null

Property Details

$containerOptions public property

the HTML attributes for the layer that will render the map.
public $containerOptions

$height public property

the height in pixels or percent of the container holding the map.
public $height

$width public property

the width in pixels or percent of the container holding the map.
public $width