views:

284

answers:

2

Hey guys,

I wanted to test the mapKit and wanted to make my own overlay to display the accuracy of my position. If i have a zoom factor of for example .005 which radius does my circle around me has to have(If my accuracy is for example 500m)?

Would be great to get some help :)

Thanks a lot.

+1  A: 

Look at the documentation for MKCoordinateSpan, which is part of the map's region property. One degree of latitude is always approx. 111 km, so converting the latitudeDelta to meters and then getting to the meters per pixel should be easy. For longitudinal values it is not quite so easy as the distance covered by one degree of longitude varies between 111 km (at the equator) and 0 km (at the poles).

Ole Begemann
A: 

To add to the above answer, a difference of one minute of latitude corresponds to one nautical mile: that's how the nautical mile was defined. So, converting to statute miles, 1 nautical mile = 1.1508 statue miles, or 6076.1 ft. or 1852 meters.

When you go to longitude, the size of the longitude circles around the Earth (God bless her) shrink as latitude increases, as was noted on the previous answer. The correct factor is that

1 minute of longitude = (1852 meters)*cos(theta),

where theta is the latitude.

Of course, the Earth is not a perfect sphere, but the simple calculation above would never be off by more than 1%.

Good luck.

John R Doner