CaptainSpam / geohashdroid

A Geohashing app for Android devices
Other
30 stars 6 forks source link

Start map in location of current graticule #87

Open stevage opened 2 weeks ago

stevage commented 2 weeks ago

It's a small issue, but everytime the app starts, it centres the map on 0,0 and zoomed out to the whole world. Then once it has found a geohash, it zooms the map there.

It'd be nice if it started the map centered on the current (or most recently used) graticule instead.

CaptainSpam commented 2 weeks ago

Hmm... I think I can do something with that. For the most part, that is; the main reason I have it starting at 0,0 is because that's just the default for the Maps libraries, and I can't guarantee there'll be a location immediately available when the app starts (it might take a few seconds to get a GPS lock, assuming it even can get one given the local conditions).

But, now that I think about it, there is a call I can make to just grab a cached, recently-known "good" location, so I could just use that as a start (or just use the center of the current graticule if it's in last-used-graticule mode), falling back to 0,0 if that data is either too old or not available.

I'll take a look and see what I can do, once I've got time to get back into the codebase. Thanks!