API / geotoolkit / util / DMSFormat / DMSFormat
Degrees minutes seconds (DMS) format primarily used to display latitude and longitude coordinates
Example
// orientation parameter can be used to distinguish latitude from longitude.
const latitude = new DMSFormat({'orientation': Orientation.Vertical});
const longitude = new DMSFormat({'orientation': Orientation.Horizontal});
latitude.format(40.730610); // 40° 43' 50'' N
longitude.format(-73.935242); // 73° 56' 6'' W↳
DMSFormat
Constructors
Methods
▸ clone(): Format
All inheritors should implement copy constructor or provide custom implementation for this method
clone
▸ Protected copyConstructor(src): DMSFormat
| Name | Type |
|---|---|
src | Format |
▸ format(number): string
Formats number to string
| Name | Type | Description |
|---|---|---|
number | number | number to be formatted |
string
▸ getClassName(): string
string
▸ getProperties(): Record<string, any>
Gets all the properties pertaining to this object
Record<string, any>
▸ setProperties(properties?): DMSFormat
Sets all the properties pertaining to this object
| Name | Type | Description |
|---|---|---|
Optional properties | Record<string, any> | An object containing the properties to set |
this
▸ Static getClassName(): string
string