Packagecom.google.maps.controls
Classpublic class ScaleControlOptions

Class ScaleControlOptions specifies a set of options for the scale control.



Public Properties
 PropertyDefined by
  labelFormat : TextFormat
Format for the label(s) of the control.
ScaleControlOptions
  lineThickness : Object
An integer value indicating the thickness of the lines in the scale control.
ScaleControlOptions
  maxWidth : Object
A number indicating the maximum width of the scale control.
ScaleControlOptions
  position : ControlPosition
Control's position on the map.
ScaleControlOptions
  units : Object
Units that are shown by the scale control.
ScaleControlOptions
Public Methods
 MethodDefined by
  
ScaleControlOptions(param:Object = null)
Constructs an ScaleControlOptions object, optionally initializing it from an object.
ScaleControlOptions
  
toString():String
Returns a String representation of this object.
ScaleControlOptions
Public Constants
 ConstantDefined by
  UNITS_BOTH : int = 0
[static] Show both imperial and metric scale indicators.
ScaleControlOptions
  UNITS_BOTH_PREFER_IMPERIAL : int = 2
[static] Show both imperial and metric scale indicators with the imperial scale indicator appearing on top.
ScaleControlOptions
  UNITS_BOTH_PREFER_METRIC : int = 1
[static] Show both imperial and metric scale indicators with the metric scale indicator appearing on top.
ScaleControlOptions
  UNITS_IMPERIAL_ONLY : int = 6
[static] Show only the imperial scale indicator.
ScaleControlOptions
  UNITS_METRIC_ONLY : int = 5
[static] Show only the metric scale indicator.
ScaleControlOptions
  UNITS_SINGLE : int = 4
[static] Show only one scale indicator, chosen based upon the user's locale.
ScaleControlOptions
Property detail
labelFormatproperty
labelFormat:TextFormat  [read-write]

Format for the label(s) of the control.

Implementation
    public function get labelFormat():TextFormat
    public function set labelFormat(value:TextFormat):void
lineThicknessproperty 
lineThickness:Object  [read-write]

An integer value indicating the thickness of the lines in the scale control.

Implementation
    public function get lineThickness():Object
    public function set lineThickness(value:Object):void
maxWidthproperty 
maxWidth:Object  [read-write]

A number indicating the maximum width of the scale control.

Implementation
    public function get maxWidth():Object
    public function set maxWidth(value:Object):void
positionproperty 
position:ControlPosition  [read-write]

Control's position on the map.

Implementation
    public function get position():ControlPosition
    public function set position(value:ControlPosition):void
unitsproperty 
units:Object  [read-write]

Units that are shown by the scale control. One of the ScaleControlOptions.UNITS_ constants.

Implementation
    public function get units():Object
    public function set units(value:Object):void
Constructor detail
ScaleControlOptions()constructor
public function ScaleControlOptions(param:Object = null)

Constructs an ScaleControlOptions object, optionally initializing it from an object.

Parameters
param:Object (default = null) — An initialization object containing a set of values that supplement the default set.
   // Initialization object corresponding to the default set.
   { position: new ControlPosition(ControlPosition.ANCHOR_BOTTOM_LEFT, 70, 5)
     units: ScaleControlOptions.UNITS_BOTH,
     maxWidth: 125,
     lineThickness: 1,
     labelFormat: {
       font: "_sans",
       size: 11
     }
   }
Method detail
toString()method
public function toString():String

Returns a String representation of this object.

Returns
String — String representation of this object.
Constant detail
UNITS_BOTHconstant
public static const UNITS_BOTH:int = 0

Show both imperial and metric scale indicators.

UNITS_BOTH_PREFER_IMPERIALconstant 
public static const UNITS_BOTH_PREFER_IMPERIAL:int = 2

Show both imperial and metric scale indicators with the imperial scale indicator appearing on top.

UNITS_BOTH_PREFER_METRICconstant 
public static const UNITS_BOTH_PREFER_METRIC:int = 1

Show both imperial and metric scale indicators with the metric scale indicator appearing on top.

UNITS_IMPERIAL_ONLYconstant 
public static const UNITS_IMPERIAL_ONLY:int = 6

Show only the imperial scale indicator.

UNITS_METRIC_ONLYconstant 
public static const UNITS_METRIC_ONLY:int = 5

Show only the metric scale indicator.

UNITS_SINGLEconstant 
public static const UNITS_SINGLE:int = 4

Show only one scale indicator, chosen based upon the user's locale.