Packagecom.esri.ags.components
Classpublic class ScaleBar
InheritanceScaleBar Inheritance spark.components.supportClasses.SkinnableComponent

The Scale Bar component for the Map. By default the scale bar will be visible, but you can change this using the Map.scaleBarVisible property.

Sample image of the scale bar: Scale bar showing miles and km

See also

com.esri.ags.Map.scaleBarVisible


Public Properties
 PropertyDefined By
  lengthMetric : Number
The length in pixels of the metric scale bar.
ScaleBar
  lengthUS : Number
The length in pixels of the US scale bar.
ScaleBar
  map : Map
The Map that the ScaleBar is associated with.
ScaleBar
  textMetric : String
The text to display the 'km' or 'm' value.
ScaleBar
  textUS : String
The text to display the 'miles' or 'feet' value.
ScaleBar
Public Methods
 MethodDefined By
  
Creates a new ScaleBar component.
ScaleBar
Property Detail
lengthMetricproperty
lengthMetric:Number

The length in pixels of the metric scale bar.

This property can be used as the source for data binding.


Implementation
    public function get lengthMetric():Number
    public function set lengthMetric(value:Number):void
lengthUSproperty 
lengthUS:Number

The length in pixels of the US scale bar.

This property can be used as the source for data binding.


Implementation
    public function get lengthUS():Number
    public function set lengthUS(value:Number):void
mapproperty 
map:Map

The Map that the ScaleBar is associated with. When the scale bar class is defined in a Map instance, then the map instance is 'injected' via the setter on the newly created scale bar instance.

This property can be used as the source for data binding.


Implementation
    public function get map():Map
    public function set map(value:Map):void
textMetricproperty 
textMetric:String

The text to display the 'km' or 'm' value.

This property can be used as the source for data binding.


Implementation
    public function get textMetric():String
    public function set textMetric(value:String):void
textUSproperty 
textUS:String

The text to display the 'miles' or 'feet' value.

This property can be used as the source for data binding.


Implementation
    public function get textUS():String
    public function set textUS(value:String):void
Constructor Detail
ScaleBar()Constructor
public function ScaleBar()

Creates a new ScaleBar component.