(iOS/OSX) Implement didUpdateToLocation and didUpdateLocations
This commit is contained in:
parent
47b8874cc5
commit
f970b4835d
|
@ -320,7 +320,7 @@ didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer
|
||||||
locationManager = [[CLLocationManager alloc] init];
|
locationManager = [[CLLocationManager alloc] init];
|
||||||
|
|
||||||
locationManager.delegate = self;
|
locationManager.delegate = self;
|
||||||
locationManager.desiredAccuracy = kCLLocationAccuracyKilometer;
|
locationManager.desiredAccuracy = kCLLocationAccuracyBest;
|
||||||
|
|
||||||
// Set a movement threshold for new events.
|
// Set a movement threshold for new events.
|
||||||
locationManager.distanceFilter = 500; // meters - TODO - make configurable
|
locationManager.distanceFilter = 500; // meters - TODO - make configurable
|
||||||
|
@ -340,6 +340,17 @@ didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
- (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation
|
||||||
|
{
|
||||||
|
NSLog(@"====latitude %f, longitude %f", newLocation.coordinate.latitude, newLocation.coordinate.longitude);
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray *)locations
|
||||||
|
{
|
||||||
|
NSLog(@"==latitude %f, longitude %f", [[locations objectAtIndex:([locations count]-1)] coordinate].latitude , [[locations objectAtIndex:([locations count]-1)] coordinate].longitude);
|
||||||
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
static RAScreen* get_chosen_screen()
|
static RAScreen* get_chosen_screen()
|
||||||
|
|
Loading…
Reference in New Issue