-2
- (void)viewDidLoad
{
[super viewDidLoad];
NSURLSessionConfiguration *config = [NSURLSessionConfiguration defaultSessionConfiguration];
config.URLCache = [[NSURLCache alloc] initWithMemoryCapacity:2 * 1024 * 1024
diskCapacity:10 * 1024 * 1024
diskPath:@"MarkerData"];
self.markerSession = [NSURLSession sessionWithConfiguration:config];
locationManager = [[CLLocationManager alloc] init];
NSLog(@"locationServicesEnabled: %@", [CLLocationManager locationServicesEnabled] ? @"YES":@"NO");
CLLocationManager *lm = [[CLLocationManager alloc] init];
lm.delegate = self;
lm.desiredAccuracy = kCLLocationAccuracyBest;
lm.distanceFilter = kCLDistanceFilterNone;
[lm startUpdatingLocation];
//[lm stopUpdatingLocation];
CLLocation *location = [lm location];
CLLocationCoordinate2D coord;
coord.longitude = location.coordinate.longitude;
NSString *ss= [NSString stringWithFormat:@"%.8f",coord.longitude ];
coord.latitude = location.coordinate.latitude;
NSString *aa= [NSString stringWithFormat:@"%.8f",coord.latitude ];
NSLog(@"oooooooo2");
NSLog(ss);
NSLog(aa);
NSLog(@"kkkkkkkkk2");
}