Packageorg.openscales.core.control
Classpublic class ScaleLine
InheritanceScaleLine Inheritance Control Inheritance flash.display.Sprite

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



Public Properties
 PropertyDefined by
 Inheritedactive : 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
 Inheritedposition : Pixel
Control
  scaleMaxWidth : Number
ScaleLine
  topInUnits : String
ScaleLine
  topOutUnits : String
ScaleLine
  topPx : Number
ScaleLine
Protected Properties
 PropertyDefined by
 Inherited_active : Boolean = false
Control
 Inherited_map : Map = null
Control
Public Methods
 MethodDefined by
  
ScaleLine(position:Pixel = null)
Constructor
ScaleLine
 Inherited
destroy():void
Control
  
draw():void
ScaleLine
 Inherited
resize(event:MapEvent):void
Control
  
updateScaleLine(event:Event):void
Redraw the scaleline with new parameters.
ScaleLine
Property detail
bottomInUnitsproperty
bottomInUnits:String  [read-write]Implementation
    public function get bottomInUnits():String
    public function set bottomInUnits(value:String):void
bottomOutUnitsproperty 
bottomOutUnits:String  [read-write]Implementation
    public function get bottomOutUnits():String
    public function set bottomOutUnits(value:String):void
colorproperty 
color:int  [read-write]Implementation
    public function get color():int
    public function set color(value:int):void
labelKmproperty 
labelKm:TextField  [read-write]Implementation
    public function get labelKm():TextField
    public function set labelKm(value:TextField):void
labelMilesproperty 
labelMiles:TextField  [read-write]Implementation
    public function get labelMiles():TextField
    public function set labelMiles(value:TextField):void
mapproperty 
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
scaleMaxWidthproperty 
scaleMaxWidth:Number  [read-write]Implementation
    public function get scaleMaxWidth():Number
    public function set scaleMaxWidth(value:Number):void
topInUnitsproperty 
topInUnits:String  [read-write]Implementation
    public function get topInUnits():String
    public function set topInUnits(value:String):void
topOutUnitsproperty 
topOutUnits:String  [read-write]Implementation
    public function get topOutUnits():String
    public function set topOutUnits(value:String):void
topPxproperty 
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.