GeoUtils class

Constructors

GeoUtils()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

capRadius(double radius) double
coordinatesValid(double latitude, double longitude) bool
Checks if these coordinates are valid geo coordinates. latitude The latitude must be in the range -90, 90 longitude The longitude must be in the range -180, 180 returns true if these are valid geo coordinates
degreesToRadians(double degrees) double
distance(GeoPoint p1, GeoPoint p2) double
Calculates the distance, in kilometers, between two locations, via the Haversine formula. Note that this is approximate due to the fact that the Earth's radius varies between 6356.752 km and 6378.137 km. p1 The first location given p2 The second location given return the distance, in kilometers, between the two locations.
distanceToLatitudeDegrees(double distance) double
distanceToLongitudeDegrees(double distance, double latitude) double
Calculates the number of degrees a given distance is at a given latitude. distance The distance to convert. latitude The latitude at which to calculate. returns the number of degrees the distance corresponds to.
geoPointValid(GeoPoint point) bool
Checks if the coordinates of a GeopPoint are valid geo coordinates. latitude The latitude must be in the range -90, 90 longitude The longitude must be in the range -180, 180 returns true if these are valid geo coordinates
wrapLongitude(double longitude) double
Wraps the longitude to -180,180.