首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > 移动开发 >

Apple内部对MKUserLocation除去偏移的方法

2012-06-30 
Apple内部对MKUserLocation去除偏移的方法。找到Apple内部对MKUserLocation去除偏移的方法。?[MKLocationMan

Apple内部对MKUserLocation去除偏移的方法。

找到Apple内部对MKUserLocation去除偏移的方法。?

[MKLocationManager _applyChinaLocationShift:(CLLocation*)arg]?

这个方法返回去除偏移后的CLLocation*。?


Code:?


@interface?MKLocationManager?
- (CLLocation*)_applyChinaLocationShift:(CLLocation*)arg;?
- (BOOL)chinaShiftEnabled;?
+ (id)sharedLocationManager;?
@end?

CLLocationManager's Delegate:?

- (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation?
{?
if ([[MKLocationManager sharedLocationManager] chinaShiftEnabled]) {?
newLocation = [[MKLocationManager sharedLocationManager] _applyChinaLocationShift:newLocation];?
if (newLocation == nil) return;?
}?
}

热点排行