imperiumlabs / GeoFirestore-Android

GeoFirestore for Android - Realtime location queries with Firestore
MIT License
123 stars 36 forks source link

get Location #57

Open vision4shops opened 3 years ago

vision4shops commented 3 years ago

Even though the bug was fixed i am still getting location doesnt exist exception. I have checked every possible way to resolve it. The set location is working fine and locations for documents are correctly set. When i try to retrieve these locations i get the previously mentioned exception. I used: implementation 'com.github.imperiumlabs:GeoFirestore-Android:v1.5.0' Firestore connection is checked, everything is working fine, this is a large scale app. Please help me :)

HeinousGames commented 2 years ago

I gave up on relying on this library for getting a location, despite the fact that location setting is still working. Instead I'm just getting the value manually as such (example in Kotlin)

fsDB.collection("LocationCollection").document("locationKey").get().addOnSuccessListener { val geoPoint = it.data!!["l"] as GeoPoint val locationOnMap = LatLng(geoPoint.latitude, geoPoint.longitude)}