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

Package | org.openscales.core.basetypes
Class | public class Unit

The map unit

Public Properties

| Property | Defined by
--- | --- | ---
|  | DEGREE : String = "degrees" [static] | Unit
|  | DOTS_PER_INCH : int = 72 [static] | Unit
|  | FOOT : String = "ft" [static] | Unit
|  | INCH : String = "inch" [static] | Unit
|  | KILOMETER : String = "km" [static] | Unit
|  | METER : String = "m" [static] | Unit
|  | MILE : String = "mi" [static] | Unit

Public Methods

| Method | Defined by
--- | --- | ---
|  | getInchesPerUnit(unit:String):Number [static] | Unit
|  | getResolutionFromScale(scale:Number, units:String = null):Number [static] | Unit
|  | getScaleFromResolution(resolution:Number, units:String):Number [static] | Unit

Property detail

DEGREE | property

`public static var DEGREE:String = "degrees"`

DOTS_PER_INCH | property |

`public static var DOTS_PER_INCH:int = 72`

FOOT | property |

`public static var FOOT:String = "ft"`

INCH | property |

`public static var INCH:String = "inch"`

KILOMETER | property |

`public static var KILOMETER:String = "km"`

METER | property |

`public static var METER:String = "m"`

MILE | property |

`public static var MILE:String = "mi"`
Method detail

getInchesPerUnit | () | method

`public static function getInchesPerUnit(unit:String):Number` Parameters

| `unit:String`

Returns

| `Number`

getResolutionFromScale | () | method |

`public static function getResolutionFromScale(scale:Number, units:String = null):Number` Parameters

| `scale:Number`
| `units:String` (default = `null`)``

Returns

| `Number`

getScaleFromResolution | () | method |

`public static function getScaleFromResolution(resolution:Number, units:String):Number` Parameters

| `resolution:Number`
| `units:String`

Returns

| `Number`