我曾尝试使用tapmessage的wheregeo和worldloc属性创建一个cllocation对象。但是,我从它们得到的lat和lon & x,y值不能用于创建cllocation对象。也许我的格式不正确?
感谢预付款
记录这一点
GeoCoord coord = msg.whereGeo;
Point3f point = msg.worldLoc;
NSLog(@"x point is %f",point.x());
NSLog(@"y point is %f",point.y());
NSLog(@"from wheregeo %f",coord.lat());
NSLog(@"from wheregeo %f",coord.lon());给了我这个
2012-01-19 12:30:22.491 WhirlyGlobeApp1068:4007x point is -0.138646
2012-01-19 12:30:22.492旋转GlobeApp1068:4007y点为0.554229
2012-01-19 12:30:22.493 WhirlyGlobeApp1068:4007出处0.962698
2012-01-19 12:30:22.494 WhirlyGlobeApp1068:4007出处1.815925
我正在使用带有纬度和经度的cllocation默认init方法
发布于 2012-01-20 01:45:10
那就是弧度和度数。坐标是以弧度表示的,但是CLLocation可能需要度数。
只需在GlobeMath.h中使用RadToDeg()模板即可。它看起来很奇怪,但只需像调用函数一样调用它。
https://stackoverflow.com/questions/8930597
复制相似问题