Dms class
A default implementation for DmsFormat abstract base class, that defines methods for parsing and formatting degrees/minutes/seconds on latitude, longitude and bearing values.
Constructors
- Dms({DmsType type = DmsType.deg, String separator = '', int? decimals, bool signedDegrees = false, bool zeroPadDegrees = false, bool zeroPadMinSec = true, String degree = '°', String prime = '′', String doublePrime = '″'})
-
Creates a new formatter for parsing and formatting degrees/minutes/seconds
on latitude, longitude and bearing values.
const
- Dms.narrowSpace({DmsType type = DmsType.deg, int? decimals, bool signedDegrees = false, bool zeroPadDegrees = false, bool zeroPadMinSec = true, String degree = '°', String prime = '′', String doublePrime = '″'})
-
Creates a new formatter for parsing and formatting degrees/minutes/seconds
on latitude, longitude and bearing.
const
- Dms.numeric({DmsType type = DmsType.deg, String separator = '\u202f', int? decimals, bool zeroPadDegrees = false, bool zeroPadMinSec = true})
-
Creates a new formatter for parsing and formatting degrees/minutes/seconds
on latitude, longitude and bearing.
const
Properties
- hashCode → int
-
The hash code for this object.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
bearing(
double deg) → String -
Converts a degree value
deg
to a String representation (deg/min/sec) of the bearing (3-digit degrees, 0°..360°) according to the specifiedtype
.override -
compassPoint(
double bearing, {CardinalPrecision precision = CardinalPrecision.secondaryIntercardinal}) → String -
Returns the compass point for
bearing
on the givenprecision
.inherited -
copyWith(
{DmsType? type, String? separator, int? decimals, bool? signedDegrees, bool? zeroPadDegrees, bool? zeroPadMinSec, String? degree, String? prime, String? doublePrime}) → Dms - Copy a new formatter from this with given attributes changed.
-
format(
double deg, {bool twoDigitDeg = false}) → String -
Converts the degree value
deg
to a String representation (deg/min/sec) according to the specifiedtype
.override -
lat(
double deg) → String -
Converts a degree value
deg
to a String representation (deg/min/sec) of the latitude (2-digit degrees, suffixed with N/S) according to the specifiedtype
.override -
lon(
double deg) → String -
Converts a degree value
deg
to a String representation (deg/min/sec) of the longitude (3-digit degrees, suffixed with E/W) according to the specifiedtype
.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
parse(
String dms) → double -
Parses a string
dms
representing degrees/minutes/seconds into a numeric degree value (ie. latitude, longitude or bearing).override -
toString(
) → String -
A string representation of this object.
override
-
tryParse(
String dms) → double? -
Parses a string
dms
representing degrees/minutes/seconds into a numeric degree value (ie. latitude, longitude or bearing).inherited -
write(
StringSink buf, double deg, {bool twoDigitDeg = false}) → void -
Writes the degree value
deg
as a String representation (deg/min/sec) tobuf
.override -
writeBearing(
StringSink buf, double deg) → void -
Writes a degree value
deg
as a String representation (deg/min/sec) of the bearing tobuf
.override -
writeLat(
StringSink buf, double deg) → void -
Writes a degree value
deg
as a String representation (deg/min/sec) of the latitude tobuf
.override -
writeLon(
StringSink buf, double deg) → void -
Writes a degree value
deg
as a String representation (deg/min/sec) of the longitude tobuf
.override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override