Alex Rivera | Logout

How to display the radius in MKCircle on Map in meters

Asked 2011-09-02T14:01:55.917
10

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.

Edit
Report

2 Answers

1

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".

answered 2011-09-02T14:38:32.043
0

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

answered 2012-05-16T19:43:39.760

Your Answer