Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6867031
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T03:15:27+00:00 2026-05-27T03:15:27+00:00

How can I convert an MKCircle’s radius (in meters) into a value I can

  • 0

How can I convert an MKCircle’s radius (in meters) into a value I can use to draw a circle using core graphics in an MKOverlayPathView subclass?

In the following code the radius is hardcoded to 50 but I need it to reflect the radius of the MKCircle.

For the position I use MKMapPointForCoordinate() to convert the MKCircle’s coordinate to an MKMapPoint, then convert the MKMapPoint to a point using MKOverlayPathView’s pointForMapPoint:. But how can I convert the MKCircle’s radius into a relative distance?

MKCircle *circle = [self circleForLocation:location]; 
CGPoint relativePoint = [self pointForMapPoint:MKMapPointForCoordinate(circle.coordinate)];
float radius = 50;

//Fill
[self applyFillPropertiesToContext:context atZoomScale:zoomScale];
CGContextAddArc(context, relativePoint.x, relativePoint.y, radius, 0, 2*3.1415926535898, 1);
CGContextDrawPath(context, kCGPathFill);
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T03:15:27+00:00Added an answer on May 27, 2026 at 3:15 am

    The height and width of the MKCircle’s boundingMapRect should be equal to the circle’s diameter:

    CGRect boundingRect = [self rectForMapRect:circle.boundingMapRect];
    CGFloat radius = boundingRect.size.width / 2;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I can convert an integer into string using String s = + 4; //
I know that you can convert a float into a string using NSString *myString
How i can convert string into hash? now i use: eval {'1627207:28320'=>'text'} => {'1627207:28320'=>'text'}
we can convert character to an integer equivalent to the ASCII value of the
we can convert the dictionary to kw using **kw but if I want kw
Anyone know how I can convert Request.Cookies into a List<HttpCookie> ? The following didn't
how we can convert text file into xml format in c#
In Specman I can convert a variable to a string using either: x.to_string(); or
Can somebody please explain to me how I can convert 2009-10-27 14:36:59.580250 into 27.10.2009,
Is there a way I can convert an mp3 file into a wav/aiff in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.