MKMapView setCenterCo整理在南半球添加抖动
我每秒都会使用从附件获得的 GPS 数据将 MKMapView 居中。
[_mapView setCenterCoordinate:CLLocationCoordinate2DMake(location.latitude, location.longitude) animated:YES];
现在我们正在新西兰测试我们的代码,地图有很多很多额外的抖动。有时看起来就像发生了地震。然后,我将每秒收到的纬度和经度值偏移到美国的某个地方。抖动消失了,没有地震影响。
当我们设置南半球的中心坐标时,我们需要对坐标进行一些转换吗?
I'm centering the MKMapView every second with GPS data we get from an Accessory.
[_mapView setCenterCoordinate:CLLocationCoordinate2DMake(location.latitude, location.longitude) animated:YES];
Now we are testing our code in New Zealand and the map has lots and lots of extra jitter. Sometimes it seems like an earthquake is happening. Well then I offset those latitude and longitude values that we receive every second to somewhere in the U.S. The jitter was gone and there was no earthquake affect.
When we are setting the center coordinate in the Southern Hemisphere is there some conversion we have to do on the coordinates?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是一个问题,因为 MKMapView 的大小大于视图的大小,在我们的例子中为 1024 X 78。这在某些情况下会导致地震影响,并且它发生在两个半球,而不仅仅是南半球。一旦我们将其大小调整为 1024 X 78,就没有出现任何问题。
This was an issue where the MKMapView was sized greater than the view could be which in our case was 1024 X 78. This caused an earthquake affect in certain situations and it happened in both hemispheres, not just Souther Hemisphere. Once we sized it to 1024 X 78, no problems occurred.