def init_with_thread(self, thread): self = super(LocationManager, self).init() self.lm = CLLocationManager.alloc().init() self.thread = thread self.goodPositionFound = False self.goodLocation = None self.lm.setDelegate_(self) self.lm.startUpdatingLocation() return self
def init(self): """Define location manager settings for lookups.""" self = super(MyLocationManagerDelegate, self).init() if not self: return self.locationManager = CLLocationManager.alloc().init() self.locationManager.setDelegate_(self) self.locationManager.setDistanceFilter_(kCLDistanceFilterNone) self.locationManager.setDesiredAccuracy_(kCLLocationAccuracyBest) self.locationManager.startUpdatingLocation() return self
def init(self): self = super(MyLocationManagerDelegate, self).init() if not self: return self.locationManager = CLLocationManager.alloc().init() self.locationManager.setDelegate_(self) self.locationManager.setDistanceFilter_(kCLDistanceFilterNone) self.locationManager.setDesiredAccuracy_( kCLLocationAccuracyThreeKilometers) self.locationManager.startUpdatingLocation() return self