Class: DmsFormatter
A class to format latitude/longitude to DMS. DmsFormatter
Constructors
constructor
• new DmsFormatter(): DmsFormatter
Returns
Methods
getLatDmsStr
▸ getLatDmsStr(value
, spaceAfterDirection?
, minuteApostrophe?
, precision?
, padMinutesTo?
): string
Builds a DMS string out of the given latitude.
Parameters
Name | Type | Default value | Description |
---|---|---|---|
value | number | undefined | The latitude. |
spaceAfterDirection | boolean | true | Whether to insert a space after the direction letter. |
minuteApostrophe | boolean | true | Whether to insert an apostrophe (') after the string. |
precision | number | 2 | Decimal precision for the minutes part. |
padMinutesTo | number | 3 | Padding applied to integer part of minutes. |
Returns
string
The DMS string.
Defined in
src/sdk/graphics/text/DmsFormatter.ts:42
getLonDmsStr
▸ getLonDmsStr(value
, minuteApostrophe?
, precision?
, padMinutesTo?
): string
Builds a DMS string out of the given longitude.
Parameters
Name | Type | Default value | Description |
---|---|---|---|
value | number | undefined | The longitude. |
minuteApostrophe | boolean | true | Whether to insert an apostrophe (') after the string. |
precision | number | 2 | Decimal precision for the minutes part. |
padMinutesTo | number | 3 | Padding applied to integer part of minutes. |
Returns
string
The DMS string.
Defined in
src/sdk/graphics/text/DmsFormatter.ts:59
parseLat
▸ parseLat(value
): DmsValues
Parses a latitude in to the dms parts.
Parameters
Name | Type | Description |
---|---|---|
value | number | The latitude in degrees. |
Returns
DmsValues
The DMS parts.
Defined in
src/sdk/graphics/text/DmsFormatter.ts:73
parseLon
▸ parseLon(value
): DmsValues
Parses a longitude in to the dms parts.
Parameters
Name | Type | Description |
---|---|---|
value | number | The longitude in degrees. |
Returns
DmsValues
The DMS parts.
Defined in
src/sdk/graphics/text/DmsFormatter.ts:83