Skip to content

API / geotoolkit / util / DMSFormat / DMSFormat

Class: DMSFormat

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

Hierarchy

Table of contents

Constructors
  • [new DMSFormat(options)](/solutions/geotoolkit/GeoToolkit_JS/apis/classes/geotoolkit.util.dmsformat.dmsformat.md#new dmsformat(options))
Methods

Contents

Constructors

new DMSFormat(options)

• new DMSFormat(options?)

Parameters

Name Type
Optional optionsOptions

Overrides

Format.constructor

Methods

clone

▸ clone(): Format

All inheritors should implement copy constructor or provide custom implementation for this method

Returns

Format

clone

Inherited from

Format.clone


copyConstructor

▸ Protected copyConstructor(src): DMSFormat

Parameters

Name Type
srcFormat

Returns

DMSFormat

Inherited from

Format.copyConstructor


format

▸ format(number): string

Formats number to string

Parameters

Name Type Description
numbernumbernumber to be formatted

Returns

string

Overrides

Format.format


getClassName

▸ getClassName(): string

Returns

string

Inherited from

Format.getClassName


getProperties

▸ getProperties(): Record<string, any&gt;

Gets all the properties pertaining to this object

Returns

Record<string, any&gt;

Inherited from

Format.getProperties


setProperties

▸ setProperties(properties?): DMSFormat

Sets all the properties pertaining to this object

Parameters

Name Type Description
Optional propertiesRecord<string, any&gt;An object containing the properties to set

Returns

DMSFormat

this

Inherited from

Format.setProperties


getClassName

▸ Static getClassName(): string

Returns

string

Inherited from

Format.getClassName