LatLong class

This immutable class represents a geographic coordinate with a latitude and longitude value.

Implemented types

Constructors

LatLong(double latitude, double longitude)
Constructs a new LatLong with the given latitude and longitude values, measured in degrees.
const

Properties

hashCode int
The hash code for this object.
no setteroverride
latitude double
The internal latitude value.
final
longitude double
The internal longitude value.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

getLatitude() double?
Returns the latitude value of this coordinate.
getLatitudeE6() int
Returns the latitude value in microdegrees of this coordinate.
getLongitude() double?
Returns the longitude value of this coordinate.
getLongitudeE6() int
Returns the longitude value in microdegrees of this coordinate.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
Calculate the spherical distance from this LatLong to another.
override

Operators

operator ==(Object other) bool
Calculate the Euclidean distance from this LatLong to another.
override

Static Properties

CONVERSION_FACTOR double
Conversion factor from degrees to microdegrees.
final

Static Methods

degreesToMicrodegrees(double coordinate) int
Converts a coordinate from degrees to microdegrees (degrees * 10^6). No validation is performed.
fromMicroDegrees(int latitudeE6, int longitudeE6) LatLong
Constructs a new LatLong with the given latitude and longitude values, measured in microdegrees.
fromString(String latLonString) LatLong
Constructs a new LatLong from a comma-separated String containing latitude and longitude values (also ';', ':' and whitespace work as separator). Latitude and longitude are interpreted as measured in degrees.