Geolocation class

Represents a Geo Location in latitude and longitude.

Constructors

Geolocation(num _latitude, num _longitude)

Properties

hashCode → int
The hash code for this object.
no setterinherited
latitude → num
The latitude of the coordinate.
no setter
longitude → num
The longitude of the coordinate.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

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 (° or o) and an optional cardinal letter.
final

Static Methods

formatGeolocation(Point<num> geo) → String
formatLatitude(num lat) → String
Formats a latitude lat with the cardinal N (lat >= 0) or S (lat < 0, shown without the minus sign): 10°N, 10°S.
formatLongitude(num long) → String
Formats a longitude long with the cardinal E (long >= 0) or W (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,25W or 123.