I have tried the following code:
- (void)viewDidLoad
{
[super viewDidLoad];
mapView_.myLocationEnabled = YES;
CLLocation *myLocation = mapView_.myLocation;
NSLog(@"%f %f",myLocation.coordinate.latitude, myLocation.coordinate.longitude);
}
The output being logged is 0.000000 0.000000.
I have also checked in the settings that the location service is enabled and is also showing enabled for my app.
Please help me figure out where am I going wrong.