| Package | com.afcomponents.umap.gui |
| Class | public class ScaleControl |
| Inheritance | ScaleControl UIMapControl fl.core.UIComponent |
| Property | Defined by | ||
|---|---|---|---|
![]() | align : Align
Gets or sets the control's alignment.
| UIMapControl | |
![]() | asDisplayObject : DisplayObject
Returns reference to the object as a DisplayObject instance.
| UIMapControl | |
![]() | core : UMap
Returns reference to the core UMap object.
| UIMapControl | |
![]() | display : String | UIMapControl | |
![]() | DISPLAY_COMPACT : String = "compact" [static]
| UIMapControl | |
![]() | DISPLAY_EXPANDED : String = "expanded" [static]
| UIMapControl | |
![]() | id : uint
Gets or sets the ID of the object.
| UIMapControl | |
![]() | minSize : Size
Gets or sets control's minimum size.
| UIMapControl | |
![]() | name : String | UIMapControl | |
![]() | offset : Offset
Gets or sets the control's offset position.
| UIMapControl | |
![]() | owner : IMapObjectContainer
Returns reference to the owner container object.
| UIMapControl | |
![]() | padding : Point
Gets or sets the control's padding value.
| UIMapControl | |
![]() | stackAlignment : String
Gets or sets control's stack alignment.
| UIMapControl | |
![]() | STACK_HORIZONTAL : String = "horizontal" [static]
| UIMapControl | |
![]() | stackPadding : Point
Gets or sets control's stack padding value.
| UIMapControl | |
![]() | STACK_VERTICAL : String = "vertical" [static]
| UIMapControl | |
| units : String
Defines the unit system to use for calculations and display.
| ScaleControl | ||
| UNIT_SYSTEMS : XML [static]
Defines the unit systems, that are used by the scale control.
| ScaleControl | ||
| Method | Defined by | ||
|---|---|---|---|
|
ScaleControl(param:Object = null)
| ScaleControl | ||
![]() |
cancelDoubleClick(event:MouseEvent = null):void
| UIMapControl | |
![]() |
cancelDragging(event:MouseEvent = null):void
| UIMapControl | |
|
dispose():void
Releases all the resources accuired by the object.
| ScaleControl | ||
![]() | UIMapControl | ||
|
getResolution(latlng:LatLng, zoom:Number, dpi:Number = 0):Number
[static]
Returns map resolution for the specified point on the map, zoom level and screen DPI.
| ScaleControl | ||
|
[static]
Returns map scale for the specified point on the map and a zoom level.
| ScaleControl | ||
|
getZoomFromResolution(latlng:LatLng, resolution:Number, dpi:Number = 0):Number
[static]
Returns map zoom level, for the specified point on the map, resolution and screen DPI.
| ScaleControl | ||
|
getZoomFromScale(latlng:LatLng, scale:Number):Number
[static]
Returns map zoom level, for the specified point on the map, and scale.
| ScaleControl | ||
![]() |
init():void
Invoked when control has been attached to GuiManager, or when UMap has been initialized.
| UIMapControl | |
![]() |
ready():void
Invoked when UMap enters ready() state.
| UIMapControl | |
![]() |
refresh():void
Refreshes the control.
| UIMapControl | |
![]() |
remove():void
Removes the object from the owner container object.
| UIMapControl | |
![]() |
setAvailableSize(size:Size):void
Invoked by GuiManager to report the available space this control can occupy.
| UIMapControl | |
![]() |
setOwner(owner:IMapObjectContainer):void
Adds the object to the specified IMapObjectContainer.
| UIMapControl | |
![]() |
setRefreshCallback(refresh:Function):void
Sets the callback function which should be called by the control after it's size has been updated.
| UIMapControl | |
|
updateMapType(mapType:IMapType):void
Invoked when map type has been updated.
| ScaleControl | ||
|
updatePosition(latlng:LatLng):void
Invoked when map center has been updated.
| ScaleControl | ||
![]() |
updateSize(width:Number, height:Number):void
Invoked when the UMap Component size has been updated.
| UIMapControl | |
|
updateZoom(zoom:Number):void
Invoked when map zoom level has been updated.
| ScaleControl | ||
| Method | Defined by | ||
|---|---|---|---|
![]() |
createChildren():void
| UIMapControl | |
|
defineScale(latlng:LatLng = null, zoom:Number = 0):void
Defines the scale.
| ScaleControl | ||
| Constant | Defined by | ||
|---|---|---|---|
| IMPERIAL : String = "imperial" [static]
Defines the value for the imperial unit system.
| ScaleControl | ||
| METRIC : String = "metric" [static]
Defines the value for the metric unit system.
| ScaleControl | ||
| RUSSIAN : String = "russian" [static]
Defines the value for the russian unit system.
| ScaleControl | ||
| units | property |
units:String [read-write]Defines the unit system to use for calculations and display.
Implementation public function get units():String
public function set units(value:String):void
| UNIT_SYSTEMS | property |
public static var UNIT_SYSTEMS:XMLDefines the unit systems, that are used by the scale control.
Each system should have a name, defined in the name attribute. Then the list of units should be defined in the ascending order (from lowest to highest). The label and value attributes should be defined for each unit. Label attribute defines the text that will be displayed next to the resulting number. Value attribure defines how much meters are contained in 1 uint.
<systems> <system name="metric"> <unit label="meters" value="1"/> <unit label="km" value="1000"/> </system>
| ScaleControl | () | constructor |
public function ScaleControl(param:Object = null)Parameters
param:Object (default = null) |
| defineScale | () | method |
protected function defineScale(latlng:LatLng = null, zoom:Number = 0):voidDefines the scale.
Parameterslatlng:LatLng (default = null) |
|
zoom:Number (default = 0) |
| dispose | () | method |
public override function dispose():voidReleases all the resources accuired by the object.
| getResolution | () | method |
public static function getResolution(latlng:LatLng, zoom:Number, dpi:Number = 0):Number
Returns map resolution for the specified point on the map, zoom level and screen DPI.
If you ommit DPI, the Capabilities.screenDPI value will be used (may be wrong).
latlng:LatLng — LatLng object which specifies a point on the map.
|
|
zoom:Number — Map zoom level.
|
|
dpi:Number (default = 0) — Screen dpi.
|
Number — Map resolution.
|
| getScale | () | method |
public static function getScale(latlng:LatLng, zoom:Number):NumberReturns map scale for the specified point on the map and a zoom level. Scale is measured in meters/pixel.
Parameterslatlng:LatLng — LatLng object which specifies a point on the map.
|
|
zoom:Number — Map zoom level.
|
Number — Map scale in meters/pixel.
|
| getZoomFromResolution | () | method |
public static function getZoomFromResolution(latlng:LatLng, resolution:Number, dpi:Number = 0):Number
Returns map zoom level, for the specified point on the map, resolution and screen DPI.
If you ommit DPI, the Capabilities.screenDPI value will be used (may be wrong).
latlng:LatLng — LatLng object which specifies a point on the map.
|
|
resolution:Number — Target map resolution.
|
|
dpi:Number (default = 0) |
Number — Map zoom level at the specified point and map resolution.
|
| getZoomFromScale | () | method |
public static function getZoomFromScale(latlng:LatLng, scale:Number):NumberReturns map zoom level, for the specified point on the map, and scale. Scale should be specified in meter/pixel.
Parameterslatlng:LatLng — LatLng object which specifies a point on the map.
|
|
scale:Number — Map scale in meter/pixel.
|
Number — Map zoom level at the specified point and map scale.
|
| updateMapType | () | method |
public override function updateMapType(mapType:IMapType):voidInvoked when map type has been updated.
ParametersmapType:IMapType — Reference to the new map type.
|
| updatePosition | () | method |
public override function updatePosition(latlng:LatLng):voidInvoked when map center has been updated.
Parameterslatlng:LatLng — Geographical coordinates of the new map center.
|
| updateZoom | () | method |
public override function updateZoom(zoom:Number):voidInvoked when map zoom level has been updated.
Parameterszoom:Number — New zoom level.
|
| IMPERIAL | constant |
public static const IMPERIAL:String = "imperial"Defines the value for the imperial unit system.
| METRIC | constant |
public static const METRIC:String = "metric"Defines the value for the metric unit system.
| RUSSIAN | constant |
public static const RUSSIAN:String = "russian"Defines the value for the russian unit system.