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

outdated

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
0
pub points
88%
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

License

unknown (license)

More

Packages that depend on georange