georange 1.0.0 copy "georange: ^1.0.0" to clipboard
georange: ^1.0.0 copied to clipboard

A package that helps with encoding geohashes, decoding geohashes,calculating distance between 2 points and generating latitudinal and longitudinal ranges as geohashes to help with the querying of data [...]

example/main.dart

import 'package:georange/georange.dart';

void main() {
  GeoRange georange = GeoRange();
  var encoded = georange.encode(-1.2862368, 36.8195783);
  print(encoded);

  Point decoded = georange.decode("kzf0tvg5n");
  print(decoded.latitude);
  print(decoded.longitude);

  Point point1 = Point(latitude: -4.0435, longitude: 39.6682);
  Point point2 = Point(latitude: -1.2921, longitude: 36.8219);

  var distance = georange.distance(point1, point2);
  print(distance);

  Range range = georange.geohashRange(-1.2921, 36.8219, distance: 10);
  print(range.lower);
  print(range.upper);
}
33
likes
120
pub points
87%
popularity

Publisher

unverified uploader

A package that helps with encoding geohashes, decoding geohashes,calculating distance between 2 points and generating latitudinal and longitudinal ranges as geohashes to help with the querying of databases (Tested on Firestore Only).

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

More

Packages that depend on georange