Packagecom.yahoo.maps.api.widgets
Classpublic class ScaleBarWidget
InheritanceScaleBarWidget Inheritance Widget Inheritance flash.display.Sprite

A UI widget which displays scales for miles and kilometers/meters based on the center latitude of the map.

See also

ScaleBar


Public Properties
 PropertyDefined by
  align : String
[write-only]
ScaleBarWidget
 Inheritedmap : IYahooMap
Widget
Public Methods
 MethodDefined by
  
ScaleBarWidget(map:IYahooMap, lengthScale:int = 4)
Creates a new ScaleBarWidget object.
ScaleBarWidget
  
destroy():void
Prepares this object for garbage-collection.
ScaleBarWidget
  
Map move event handler.
ScaleBarWidget
  
Map resize event handler.
ScaleBarWidget
  
Map type change event handler.
ScaleBarWidget
  
Map zoom event handler.
ScaleBarWidget
  
updateScale():void
Updates the width and values of the scale bars.
ScaleBarWidget
Protected Methods
 MethodDefined by
 Inherited
alignWidget():void
Widget
Property detail
alignproperty
align:String  [write-only]Implementation
    public function set align(value:String):void
Constructor detail
ScaleBarWidget()constructor
public function ScaleBarWidget(map:IYahooMap, lengthScale:int = 4)

Creates a new ScaleBarWidget object.

Parameters
map:IYahooMap
 
lengthScale:int (default = 4)
Method detail
destroy()method
public override function destroy():void

Prepares this object for garbage-collection.

onMapMove()method 
public override function onMapMove(event:YahooMapEvent):void

Map move event handler.

Parameters
event:YahooMapEvent
onMapResize()method 
public override function onMapResize(event:YahooMapEvent):void

Map resize event handler.

Parameters
event:YahooMapEvent
onMapTypeChanged()method 
public override function onMapTypeChanged(event:YahooMapEvent):void

Map type change event handler.

Parameters
event:YahooMapEvent
onMapZoom()method 
public override function onMapZoom(event:YahooMapEvent):void

Map zoom event handler.

Parameters
event:YahooMapEvent
updateScale()method 
public function updateScale():void

Updates the width and values of the scale bars.