Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -(void)startLocationManager
- {
- CLLocationManager *locationManager = [[CLLocationManager alloc] init];
- locationManager.delegate=self;
- locationManager.desiredAccuracy=kCLLocationAccuracyBestForNavigation;
- [locationManager startUpdatingLocation];
- }
- -(void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation
- {
- CLLocationCoordinate2D coordinate = [newLocation coordinate];
- double dblLatitude = coordinate.latitude;
- double dblLongitude = coordinate.longitude;
- }
- if ([CLLocationManager locationServicesEnabled])
- {
- CLLocationManager *locationManager = [[CLLocationManager alloc] init];
- [locationManager startUpdatingLocation];
- CLLocationCoordinate2D *currentLocation = locationManager.location;
- [locationManager stopUpdatingLocation];
- [locationManager release];
- }
- [mapView setShowsUserLocation:YES];
- CLLocationCoordinate2D *currentLocation = mapView.userLocation.coordinate;
Add Comment
Please, Sign In to add comment