GeoHash class

Customizable Geohash, allowing you to set bits and alphabet as you like.

Constructors

GeoHash.decode(String geohash, {int bits = 5, String? alphabet})
Decode geohash and create an object
factory
GeoHash.encode(double latitude, double longitude, {int precision = 9, int bits = 5, String? alphabet})
Encodes latitude/longitude and create an object
factory

Properties

alphabet String
Alphabet used for encoding/decoding
final
bits int
Bits per char
final
bounds LatLngBounds
Bounding box
final
center LatLng
Center coordinates
final
hash String
Geohash string
final
hashCode int
The hash code for this object.
no setteroverride
precision int
Precision
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

adjacent(Direction direction) GeoHash
Determines adjacent cell in given direction.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

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

Static Methods

coverBounds(LatLngBounds bounds, {int maxPrecision = 12, int threshold = 5, int bits = 5, String? alphabet}) Map<int, List<GeoHash>>
Gets a Map containing an array of geohashes covering bounds area at each precision.