मैं इस viewDidLoad विधि के साथ उपयोगकर्ताओं को वर्तमान अक्षांश और देशांतर प्राप्त करने के लिए कोशिश कर रहा हूँ। जिसके परिणामस्वरूप नक्शा सही ढंग से वर्तमान स्थान का संकेत तथापि NSLog लगातार चलता है:
2009-09-19 16:45:29.765 Mapper[671:207] user latitude = 0.000000
2009-09-19 16:45:29.772 Mapper[671:207] user longitude = 0.000000
किसी को भी पता है कि मैं यहाँ क्या याद आ रही है? आपकी सहायता के लिये पहले से ही धन्यवाद!
- (void)viewDidLoad {
[super viewDidLoad];
[mapView setMapType:MKMapTypeStandard];
[mapView setZoomEnabled:YES];
[mapView setScrollEnabled:YES];
[mapView setShowsUserLocation:YES];
CLLocation *userLoc = mapView.userLocation.location;
CLLocationCoordinate2D userCoordinate = userLoc.coordinate;
NSLog(@user latitude = %f,userCoordinate.latitude);
NSLog(@user longitude = %f,userCoordinate.longitude);
}













