firebase / geofire-android

GeoFire for Android apps
Apache License 2.0
133 stars 36 forks source link

How to get distance for each key in GeoQuery #7

Closed bitactro closed 4 years ago

bitactro commented 4 years ago

I want to show distance like how far key is from my current location. How to do so?

samtstern commented 4 years ago

@bitactro you can use the method GeoUtils.distance to get the distance between two points: https://github.com/firebase/geofire-android/blob/master/library/src/main/java/com/firebase/geofire/util/GeoUtils.java#L29