MyGeoHash class

Constructors

MyGeoHash()

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

boundingBoxBits(GeoPoint point, double size) int
Calculates the maximum number of bits of a geohash to get a bounding box that is larger than a given size at the given coordinate.
boundingBoxCoordinates(GeoPoint center, double radius) List<GeoPoint>
Calculates eight points on the bounding box and the center of a given circle. At least one geohash of these nine coordinates, truncated to a precision of at most radius, are guaranteed to be prefixes of any geohash that lies within the circle.
degreesToRadians(double degrees) double
Converts degrees to radians. @param degrees The number of degrees to be converted to radians. @returns The number of radians equal to the inputted number of degrees.
distanceBetween(GeoPoint location1, GeoPoint location2) double
Method which 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.
geoHashForLocation(GeoPoint location, {int precision = _GEOHASH_PRECISION}) String
Generates a geohash of the specified precision/string length from the latitude, longitude pair, specified as an array.
geohashQuery(String geoHash, int bits) List<String>
Calculates the bounding box query for a geohash with x bits precision.
geohashQueryBounds(GeoPoint center, double radius) List<List<String>>
Calculates a set of query bounds to fully contain a given circle, each being a start, end pair where any geohash is guaranteed to be lexicographically larger than start and smaller than end.
latitudeBitsForResolution(double resolution) double
Calculates the bits necessary to reach a given resolution, in meters, for the latitude.
longitudeBitsForResolution(double resolution, double latitude) double
Calculates the bits necessary to reach a given resolution, in meters, for the longitude at a given latitude.
metersToLongitudeDegrees(double distance, double latitude) double
Calculates the number of degrees a given distance is at a given latitude.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
validateKey(String key) → dynamic
Validates the inputted key and throws an error if it is invalid.
validateLocation(GeoPoint? location) → dynamic
Validates the inputted location and throws an error if it is invalid. @param location The latitude, longitude pair to be verified.
wrapLongitude(double longitude) double
Wraps the longitude to -180,180.

Operators

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

Static Methods

log2(double x) → dynamic