현재 아이폰의 위치를 나타내는 푸른 색의 방사 아이콘에 mapView.showsUserLocation=YES;
을 사용하지만 좌표를 가져 오는 방법을 모릅니다. locationManager : didUpdateToLocation : fromLocation : mapView.userLocation.location
self.locationManager = [[[CLLocationManager alloc] init] autorelease]; locationManager.delegate = self; locationManager.distanceFilter=kCLDistanceFilterNone; //record every movement locationManager.desiredAccuracy=kCLLocationAccuracyBest; [locationManager startUpdatingLocation];
I 시도
중 둘 yourGPS=newLocation.coordinate;
및 didUpdateToLocation
에 yourGPS=mapView.userLocation.location.coordinate;
하지만 대부분의 시간 I 앞으로 이동 mapView.showsUserLocation=YES;
제어 청색 기포 (볼 수있는 구성으로 locationManager:didUpdateToLocation:fromLocation:
시도했지만 didUpdateToLocation
에 기록 된 좌표는 변경되지 않습니다.
파란색 버블을 구동하는 좌표를 계속 기록하려면 yourGPS=mapView.userLocation.location.coordinate;
을 입력해야합니까?
감사합니다.