Geolocation class
Represents a Geo Location in latitude and longitude.
Constructors
- Geolocation(num _latitude, num _longitude)
Properties
Methods
-
asPoint(
) → Point< num> - As Point(latitude , longitude).
-
googleMapsDirectionsURL(
Geolocation destinationGeo) → String - Generates a Google Maps Directions URL with coordinates.
-
googleMapsURL(
) → String - Generates a Google Maps URL with coordinates.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
-
windowID(
String prefix) → String - Generates a browser windoe ID with coordinates.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- geolocationFormat → RegExp
-
The format of a latitude or longitude value: an optional sign (
-or+), a number (with.or,as decimal separator), an optional degree symbol (°oro) and an optional cardinal letter.final
Static Methods
-
formatGeolocation(
Point< num> geo) → String -
formatLatitude(
num lat) → String -
Formats a latitude
latwith the cardinalN(lat >= 0) orS(lat < 0, shown without the minus sign):10°N,10°S. -
formatLongitude(
num long) → String -
Formats a longitude
longwith the cardinalE(long >= 0) orW(long < 0, shown without the minus sign):20°E,20°W. -
fromCoords(
String? coords, [bool onlyWithCardinals = false]) → Geolocation? -
parseLatitudeOrLongitudeValue(
String? s, [bool onlyWithCardinals = false]) → num? -
Parses a latitude or longitude value, such as
10.5N,10.5°S,-20.25,20,25Wor123.