OSUParcel / CorvallisBusApp

Corvallis Bus App for OSU Bus App Hackathon
1 stars 0 forks source link

Check for location after lock obtained #16

Open russellbarnes opened 10 years ago

russellbarnes commented 10 years ago

Discovered via TestFlight that sometimes, the request to server happens before a proper location lock is obtained, which makes a request to the server for stops near lat=0, long=0 and results in an empty list.

How to fix: wait until location lock is obtained before loading data from server. At worst, check if lat & long are 0.

cezarywojcik commented 10 years ago

I've come across this as well; I've been looking for some kind of location found completion block, but haven't found one yet.

cvanderschuere commented 10 years ago

You could do key-value observing on a currentLocation property. That's how we did it in Transport

cezarywojcik commented 10 years ago

We're using CLLocationManager, so I think we'll use the CLLocationManagerDelegate alongside some sort of BOOL or something. We're not guaranteed to have an instance of a GMSMapView (once we implement caching the map view images instead of showing the actual map view), so we can't use the myLocation property on there either.