目前,我使用mapView.showsUserLocation=YES;
作爲顯示iPhone位置的輻射藍色圖標,但不知道如何獲取它後面的座標。locationManager:didUpdateToLocation:fromLocation:vs. mapView.userLocation.location
我試圖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;
來記錄驅動藍色氣泡的座標?
感謝您的任何信息。