Packagecom.google.maps.interfaces
Interfacepublic interface IControl extends IWrappableEventDispatcher, flash.events.IEventDispatcher, IWrappable
SubinterfacesIScaleControl
ImplementorsControlBase, MapTypeControl, OverviewMapControl, PositionControl, ScaleControl, ZoomControl

This interface is implemented by map controls. You can implement this interface or use com.google.maps.controls.ControlBase class in order to provide a custom control for the map. Controls are added to the map using the Map.addControl() method.



Public Properties
 PropertyDefined by
 InheritedinterfaceChain : Array
List of interfaces for wrapping this object.
IWrappable
 Inheritedwrapper : Object
Instance of the cross-domain wrapper for this object.
IWrappable
Public Methods
 MethodDefined by
 Inherited
Retrieves the base event dispatcher object that allows access to event dispatching capability for cross-domain objects.
IWrappableEventDispatcher
  
Retrieves the control position.
IControl
  
getDisplayObject():DisplayObject
Retrieves the control's display object (often this would be the control object itself, but potentially be a different object if the control contains a sprite rather than extending it).
IControl
  
getSize():Point
Retrieves the control's size.
IControl
  
Sets the instance of the map that this control operates on.
IControl
  
Sets the control's position and updates its position on the map.
IControl
Method detail
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 (often this would be the control object itself, but potentially be a different object if the control contains a sprite rather than extending it).

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 this control operates on. Normally invoked from the call to Map.addControl().

Parameters
map:IMap — The map to which this control should be attached. If this control had previously been attached to another map, the control will be removed from that map and attached to this map. If the map parameter is null, the control will be removed from any previous map but not attached to a new map.
setControlPosition()method 
public function setControlPosition(position:ControlPosition):void

Sets the control's position and updates its position on the map.

Parameters
position:ControlPosition — New position for the control.

Example
   navigatorControl.setControlPosition(
       new ControlPosition(ControlPosition.ANCHOR_TOP_RIGHT, 2, 2));