flutter_geo_hash 0.0.7
flutter_geo_hash: ^0.0.7 copied to clipboard
Geohash encoding, decoding and neighbors, with Firestore geoquery bounds and distance helpers for Dart and Flutter. Compatible with Firebase geofire-common.
0.0.7 #
This release is backward compatible with 0.0.6: existing code keeps working, geohashes are unchanged, and query ranges only change where they used to miss results.
Added #
decodeGeoHashanddecodeGeoHashBounds, which decode a geohash into the center or the bounds (GeoHashBounds) of its cell.geoHashNeighbors, which returns the cells adjacent to a geohash, keyed byGeoHashDirection.isValidGeoHash, which checks a geohash without throwing.isWithinRadius, which filters query results using a radius in meters, the same unit asgeohashQueryBounds.GeoHashPoint.toString, which makes error messages show the coordinates instead ofInstance of 'GeoPoint'.- Data for
dart fix, which migrates code to the renamed classes.
Changed #
- The package no longer depends on the Flutter SDK. It still works in Flutter apps, and can now also be used in any Dart project, such as a server.
- Added explicit return types to
log2,validateKeyandvalidateLocation. - Documented the whole public API and rewrote the README, including a complete guide to querying Cloud Firestore by distance.
- Added reference, property and regression tests, and continuous integration.
Deprecated #
MyGeoHashis renamed toGeoHashUtils, andGeoPointtoGeoHashPoint. The new names don't clash with the classes of other packages, such asGeoPointincloud_firestore. The old names still work as deprecated aliases, and will be removed in a future breaking release. Rundart fix --applyto migrate.
Fixed #
geohashQueryBoundsmissed locations within the radius when the search area reached towards a pole or spanned more than half of the globe's longitudes. Ranges for other queries are unchanged.distanceBetweenreturnedNaNfor some nearly antipodal locations.validateKeyaccepted keys containing.,#,$,/,[,]or ASCII control characters, which the Firebase Realtime Database rejects. It now throws for them, as documented.geohashQueryBoundsthrew anUnsupportedErrorfor a negative, NaN or infinite radius. It now throws anArgumentErrordescribing the problem.
0.0.6 #
- Removed the unused Flutter
materialimport from the library. - Released the changes listed under 0.0.5.
0.0.5 #
This version was not published; its changes were released in 0.0.6.
- Upgraded dart sdk version.
- Removed android, iOS and web folders.
- Fixes issues and solved warnings.
- Added an example.
- Added tests.
0.0.4 #
- Wednesday, 11th August, 2021
0.0.3 #
- Sunday, 20th June, 2021