Hello, how can I convert from geohash (example: dj...
# android
h
Hello, how can I convert from geohash (example: dj0rtcbpn) to latitude and longitude using Kotlin? What is the best library? Thanks in advance.
😶 1
b
The one library I have used is: https://github.com/kungfoo/geohash-java
I have been lazily working on a pure Kotlin library that would work with MPP: https://github.com/pablobaxter/frybits-geohash
Mine isn't quite complete (queries don't work), but creating/converting geohashes is done.
h
@baxter Thanks for your reply. But there is no any information for getting latitude and longitude from geohash (example: dj0rtcbpn). Like in this site http://geohash.co/
b
Yea, documentation is lacking, but if you were to use it, you could just do
Location.toGeoHash().geohash
You can even pass in a precision, which would give you
Location.toGeoHash(precision = 5)
h
@baxter Sorry, but I can't use a dependency for it😔. Where is the dependency?
b
Ah, I haven't done that yet. You'd need to use the source for now.
👍 1