专注收集记录技术开发学习笔记、技术难点、解决方案
网站信息搜索 >> 请输入关键词:
您当前的位置: 首页 > Iphone

真机测试 CLLocationManager 定位不准确解决方案

发布时间:2010-05-30 01:26:11 文章来源:www.iduyao.cn 采编人员:星星草
真机测试 CLLocationManager 定位不准确
- (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation
{
 
  location = [newLocation coordinate];
  curLat =[NSString stringWithFormat:@"%f",location.latitude];//get latitude
  curLng =[NSString stringWithFormat:@"%f",location.longitude];//get longitude 
 
 定位不准确,有1公里左右的偏差
真机测试
}

------解决方案--------------------
你是怎么判断出不准确的?是和地图比较么?国内的地图的坐标都是经过加密的,肯定和地图没办法匹配了
------解决方案--------------------
请搜索 

火星坐标系统

就可以知道原因了。
------解决方案--------------------
[你的locaionmanager对象 setDesiredAccuracy:kCLLocationAccuracyBest];不过谷歌地图的确会做偏移,这个是国家规定,没办法
友情提示:
信息收集于互联网,如果您发现错误或造成侵权,请及时通知本站更正或删除,具体联系方式见页面底部联系我们,谢谢。

其他相似内容:

热门推荐: