How to display the radius in MKCircle on Map in meters
I need to draw a circle of a radius 1.23 metre on MkMapView using MKCircle. How would i show that on the map. I used the following ,
r = 1.23;// in metres.
circle = [MKCircle circleWithCenterCoordinate:location radius:r];
But when i draw it on the map it looks like more than 1km on the MKMapView. Could someone please tell me how i could represent a circle of radius 1.23 metre on the map??
This is mainly to show the accuracy of the location, so the开发者_开发技巧 radius indicates the accuracy of the location.
In the viewForOverlay
delegate method, try setting the lineWidth
of the MKCircleView
to 1.
I think the default width of 0 results in the "road width".
MKCircle class definition says
radius
The radius of the circle, measured in meters from the center point.
So your code should work fine.
Source: http://developer.apple.com/library/ios/#DOCUMENTATION/MapKit/Reference/MKCircle_class/Reference/Reference.html
精彩评论