目前,我使用mapView.showsUserLocation=YES;显示 iPhone 位置的辐射蓝色图标,但不知道如何获取它后面的坐标。
我尝试locationManager:didUpdateToLocation:fromLocation:了配置self.locationManager = [[[CLLocationManager alloc] init] autorelease];
locationManager.delegate = self;
locationManager.distanceFilter=kCLDistanceFilterNone; //record every movement
locationManager.desiredAccuracy=kCLLocationAccuracyBest;
[locationManager startUpdatingLocation];
我尝试了yourGPS=newLocation.coordinate;
和yourGPS=mapView.userLocation.location.coordinate;
中的任何一个didUpdateToLocation,但大多数时候我可以看到蓝色气泡(由mapView.showsUserLocation=YES;前进控制,但 中记录的坐标didUpdateToLocation没有改变。
请问我应该在哪里yourGPS=mapView.userLocation.location.coordinate;继续记录驱动蓝色气泡的坐标?
感谢您提供任何信息。