开发者

MKMapView setCenterCoordinate adding jitter in Southern Hempisphere

开发者 https://www.devze.com 2023-04-12 08:31 出处:网络
I\'m centering the MKMapView every second with GPS data we get from an Accessory. [_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开发者_Python百科 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?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号