0
我想在谷歌地圖中使用gps自動定位用戶當前位置。 是mapkit framwork,在Objective-C中用於iphone的gps。如何在谷歌地圖中使用gps目標-c
我想在谷歌地圖中使用gps自動定位用戶當前位置。 是mapkit framwork,在Objective-C中用於iphone的gps。如何在谷歌地圖中使用gps目標-c
寫
self.locationManager = [[[CLLocationManager alloc] init] autorelease];
self.locationManager.delegate = self; // Tells the location manager to send updates to this object
self.mapView.delegate = self;
self.locationManager.desiredAccuracy = kCLLocationAccuracyBest;
[self.locationManager startUpdatingLocation];
然後 實施
- (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation
委託方法newLocation將用戶的位置
的LocationManager是CLLocationManager *的LocationManager;