Packagecom.afcomponents.umap.core
Classpublic class Control
InheritanceControl Inheritance MapObjectContainer Inheritance MapObject Inheritance flash.display.Sprite
ImplementsIMapObjectContainer

Control



Public Properties
 PropertyDefined by
 InheritedasDisplayObject : DisplayObject
Returns reference to the object as a DisplayObject instance.
MapObject
 Inheritedcore : UMap
Returns reference to the core UMap object.
MapObject
  defaultProjection : IProjection
Gets or sets the default projection used by UMap.
Control
 Inheritedid : uint
Gets or sets the ID of the object.
MapObject
  imageLoader : ImageLoader
[read-only]
Control
  keyboard : KeyboardHandler
[read-only]
Control
  mapType : IMapType
Control
  mouse : MouseHandler
[read-only]
Control
 Inheritedname : String
Gets or sets the name of the object.
MapObject
 Inheritedowner : IMapObjectContainer
Returns reference to the owner container object.
MapObject
  projection : IProjection
[read-only]
Control
  provider : IProvider
[read-only] Returns a refrence to the provider, that is used in UMap.
Control
  tileSize : uint
[read-only]
Control
Public Methods
 MethodDefined by
 Inherited
addObject(object:IMapObject):void
Adds new IMapObject to the container.
MapObjectContainer
 Inherited
bringForward(object:IMapObject):void
Moves the attached IMapObject forward in the display list.
MapObjectContainer
 Inherited
bringToFront(object:IMapObject):void
Brings the attached IMapObject to the top of the display list.
MapObjectContainer
 Inherited
clearObjects(filter:Class = null):void
Removes all attached objects.
MapObjectContainer
 Inherited
dispose():void
Releases all the resources accuired by the object.
MapObjectContainer
 Inherited
getObject(id_or_name:*, filter:Class = null):IMapObject
Searches for an object with specified id or name.
MapObjectContainer
 Inherited
getObjectById(id:uint, filter:Class = null):IMapObject
Searches for an object with specified id.
MapObjectContainer
 Inherited
getObjectByName(name:String, matchCase:Boolean = false, filter:Class = null):IMapObject
Searches for an object with specified name.
MapObjectContainer
 Inherited
getObjects(filter:Class = null):Array
Returns an array of IMapObjects that where added to the container.
MapObjectContainer
 Inherited
isOwnerVisible():Boolean
Recursevly checks visibility of parent objects
MapObjectContainer
  
limitView(latlng:LatLng, cancelWarp:Boolean = false):LatLng
Limits latlng by the specified area.
Control
  
limitZoom(zoom:Number):Number
Limits the zoom level by map type and custom limitation.
Control
 Inherited
remove():void
Removes the object from the owner container object.
MapObject
 Inherited
removeObject(object:IMapObject):void
Removes IMapObject from the container.
MapObjectContainer
 Inherited
sendBackward(object:IMapObject):void
Sends the attached IMapObject backward in the display list.
MapObjectContainer
 Inherited
sendToBack(object:IMapObject):void
Sends the attached IMapObject to the bottom of the display list.
MapObjectContainer
  
setMapTypeByName(mapTypeName:String):Boolean
Control
 Inherited
Adds the object to the specified IMapObjectContainer.
MapObjectContainer
  
setProviderByClass(provider:Class):Boolean
Control
  
setViewLimit(enable:Boolean = true, bounds:LatLngBounds = null):Boolean
Enables or disables custom map view limit.
Control
  
setZoomLimit(enable:Boolean = true, min:Number, max:Number):void
Enables or disables custom zoom limit.
Control
 Inherited
toString():String
Returns a textual representation of the object.
MapObject
Public Constants
 ConstantDefined by
  DEFAULT_PROJECTION : Class
Defines the class name of the default projection.
Control
  DEFAULT_PROVIDER : Class
Defines the class name of the default provider.
Control
Property detail
defaultProjectionproperty
defaultProjection:IProjection  [read-write]

Gets or sets the default projection used by UMap.

The default value is DEFAULT_PROJECTION.

Implementation
    public function get defaultProjection():IProjection
    public function set defaultProjection(value:IProjection):void

See also

imageLoaderproperty 
imageLoader:ImageLoader  [read-only]

Implementation
    public function get imageLoader():ImageLoader
keyboardproperty 
keyboard:KeyboardHandler  [read-only]

Implementation
    public function get keyboard():KeyboardHandler
mapTypeproperty 
mapType:IMapType  [read-write]

Implementation
    public function get mapType():IMapType
    public function set mapType(value:IMapType):void
mouseproperty 
mouse:MouseHandler  [read-only]

Implementation
    public function get mouse():MouseHandler
projectionproperty 
projection:IProjection  [read-only]

Implementation
    public function get projection():IProjection
providerproperty 
provider:IProvider  [read-only]

Returns a refrence to the provider, that is used in UMap.

To set the provider use one of the following:

  • UMap.setProvider() function, which allows to set the provider either by Class or IProvider Object reference.
  • UMap.control.setProviderByClass(), which can set the provider by Class.
  • UMap.control.setProviderByInstance(), which can set the provider by IProvider Object reference.
  • Implementation
        public function get provider():IProvider

    See also

    com.afcomponents.umap.core.UMap.setProvider()
    setProviderByClass()
    setProviderByInstance()
    tileSizeproperty 
    tileSize:uint  [read-only]

    Implementation
        public function get tileSize():uint
    Method detail
    limitView()method
    public function limitView(latlng:LatLng, cancelWarp:Boolean = false):LatLng

    Limits latlng by the specified area.

    Parameters
    latlng:LatLng — Target point.
     
    cancelWarp:Boolean (default = false) — Cancels warping of longitude.

    Returns
    LatLng — Resulting point.
    limitZoom()method 
    public function limitZoom(zoom:Number):Number

    Limits the zoom level by map type and custom limitation.

    Parameters
    zoom:Number — Target zoom level.

    Returns
    Number — Resulting zoom level.
    setMapTypeByName()method 
    public function setMapTypeByName(mapTypeName:String):Boolean

    Parameters
    mapTypeName:String

    Returns
    Boolean
    setProviderByClass()method 
    public function setProviderByClass(provider:Class):BooleanParameters
    provider:Class

    Returns
    Boolean
    setViewLimit()method 
    public function setViewLimit(enable:Boolean = true, bounds:LatLngBounds = null):Boolean

    Enables or disables custom map view limit.

    To enable view limit pass true as the first parameter, and specify view area. If you ommit the second parameter or pass null value then the previuosly defined boundaries will be used.

    To disable view limit pass false as the first parameter.

    Parameters
    enable:Boolean (default = true) — Flag which defines whether custom zoom limit is enabled or not.
     
    bounds:LatLngBounds (default = null) — LatLngBounds object which defines map view limit.

    Returns
    Boolean — Returns a value true if limitation was set successfuly; false if it was not.
    setZoomLimit()method 
    public function setZoomLimit(enable:Boolean = true, min:Number, max:Number):void

    Enables or disables custom zoom limit.

    To enable zoom limit pass true as the first parameter, and specify minimum and maximum zoom level. If you don't want to limit either zoom boundary (min or max) pass Number.NaN as it's value.

    To disable zoom limit pass false as the first parameter.

    Parameters
    enable:Boolean (default = true) — Flag which defines whether custom zoom limit is enabled or not.
     
    min:Number — Minimum zoom level, or a vlaue of Number.NaN if you don't want to limit minimum zoom level.
     
    max:Number — Maximum zoom level, or a vlaue of Number.NaN if you don't want to limit maximum zoom level.
    Constant detail
    DEFAULT_PROJECTIONconstant
    public const DEFAULT_PROJECTION:Class

    Defines the class name of the default projection.

    DEFAULT_PROVIDERconstant 
    public const DEFAULT_PROVIDER:Class

    Defines the class name of the default provider.