Packagecom.google.maps.controls
Classpublic class ControlBase
InheritanceControlBase Inheritance flash.display.Sprite
ImplementsIControl

Base class for controls. Sub-class this to provide a custom control for the map.



Protected Properties
 PropertyDefined by
  map : IMap
ControlBase
  position : ControlPosition
ControlBase
Public Methods
 MethodDefined by
  
Construct a control located relative to a specfied corner of the map.
ControlBase
  
Retrieves the control position.
ControlBase
  
getDisplayObject():DisplayObject
Retrieves the control's display object (typically, the control itself).
ControlBase
  
getSize():Point
Retrieves the control's size.
ControlBase
  
Sets the instance of the map that the control operates on.
ControlBase
  
setControlPosition(controlPosition:ControlPosition):void
Changes control's position.
ControlBase
Protected Methods
 MethodDefined by
  
clearWrapper():void
Remove all event listeners and clear the wrapper.
ControlBase
Property detail
mapproperty
protected var map:IMap
positionproperty 
protected var position:ControlPosition
Constructor detail
ControlBase()constructor
public function ControlBase(position:ControlPosition)

Construct a control located relative to a specfied corner of the map.

Parameters
position:ControlPosition — Positioning of the control relative to the map.

Example
   // MyControl is a developer-created sub-class of ControlBase.
   var control:MyControl = new MyControl(
       new ControlPosition(ControlPosition.ANCHOR_TOP_RIGHT, 2, 2));

Method detail
clearWrapper()method
protected function clearWrapper():void

Remove all event listeners and clear the wrapper.

getControlPosition()method 
public function getControlPosition():ControlPosition

Retrieves the control position.

Returns
ControlPosition — Position of the control.
getDisplayObject()method 
public function getDisplayObject():DisplayObject

Retrieves the control's display object (typically, the control itself).

Returns
DisplayObject — Control's display object.
getSize()method 
public function getSize():Point

Retrieves the control's size.

Returns
Point — Control's size in pixels.
initControlWithMap()method 
public function initControlWithMap(map:IMap):void

Sets the instance of the map that the control operates on. Normally invoked automatically from the call to Map.addControl().

Parameters
map:IMap — Map interface
setControlPosition()method 
public function setControlPosition(controlPosition:ControlPosition):void

Changes control's position.

Parameters
controlPosition:ControlPosition — Control's new position.