API Documentation | All Packages | All Classes | Index | Frames No Frames |
Class ScaleLine

Package | org.openscales.core.control
Class | public class ScaleLine
Inheritance | ScaleLine Control flash.display.Sprite

The scaleLine Calcul and display an approximate scale of the current baselayer.

Public Properties
Hide Inherited Public Properties
Show Inherited Public Properties

| Property | Defined by
--- | --- | ---
|  | active : Boolean | Control
|  | bottomInUnits : String | ScaleLine
|  | bottomOutUnits : String | ScaleLine
|  | color : int | ScaleLine
|  | labelKm : TextField | ScaleLine
|  | labelMiles : TextField | ScaleLine
|  | map : Map [write-only] Get the existing map and add event listener on event Zoom end and baseLayer change. | ScaleLine
|  | position : Pixel | Control
|  | scaleMaxWidth : Number | ScaleLine
|  | topInUnits : String | ScaleLine
|  | topOutUnits : String | ScaleLine
|  | topPx : Number | ScaleLine

Protected Properties
Hide Inherited Protected Properties
Show Inherited Protected Properties

| Property | Defined by
--- | --- | ---
|  | _active : Boolean = false | Control
|  | _map : Map = null | Control

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined by
--- | --- | ---
|  | ScaleLine(position:Pixel = null) Constructor | ScaleLine
|  | destroy():void | Control
|  | draw():void | ScaleLine
|  | resize(event:MapEvent):void | Control
|  | updateScaleLine(event:Event):void Redraw the scaleline with new parameters. | ScaleLine

Property detail

bottomInUnits | property

`bottomInUnits:String` [read-write]Implementation
`public function get bottomInUnits():String`
`public function set bottomInUnits(value:String):void`

bottomOutUnits | property |

`bottomOutUnits:String` [read-write]Implementation
`public function get bottomOutUnits():String`
`public function set bottomOutUnits(value:String):void`

color | property |

`color:int` [read-write]Implementation
`public function get color():int`
`public function set color(value:int):void`

labelKm | property |

`labelKm:TextField` [read-write]Implementation
`public function get labelKm():TextField`
`public function set labelKm(value:TextField):void`

labelMiles | property |

`labelMiles:TextField` [read-write]Implementation
`public function get labelMiles():TextField`
`public function set labelMiles(value:TextField):void`

map | property |

`map:Map` [write-only]

Get the existing map and add event listener on event Zoom end and baseLayer change.

Implementation
`public function set map(value:Map):void`

scaleMaxWidth | property |

`scaleMaxWidth:Number` [read-write]Implementation
`public function get scaleMaxWidth():Number`
`public function set scaleMaxWidth(value:Number):void`

topInUnits | property |

`topInUnits:String` [read-write]Implementation
`public function get topInUnits():String`
`public function set topInUnits(value:String):void`

topOutUnits | property |

`topOutUnits:String` [read-write]Implementation
`public function get topOutUnits():String`
`public function set topOutUnits(value:String):void`

topPx | property |

`topPx:Number` [read-write]Implementation
`public function get topPx():Number`
`public function set topPx(value:Number):void`
Constructor detail

ScaleLine | () | constructor

`public function ScaleLine(position:Pixel = null)`

Constructor

Parameters

| `position:Pixel` (default = `null`)``

Method detail

draw | () | method

`public override function draw():void`

updateScaleLine | () | method |

`public function updateScaleLine(event:Event):void`

Redraw the scaleline with new parameters.

Parameters

| `event:Event` — the event can be a MapEvent.ZOOM_END or LayerEvent.BASE_LAYER_CHANGED.