Suppi
Suppi

Reputation: 630

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.

Upvotes: 10

Views: 1997

Answers (2)

Hamdi
Hamdi

Reputation: 931

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

Upvotes: 0

user467105
user467105

Reputation:

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

Upvotes: 1

Related Questions