Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement request - Variable annotation radius #6

Open
VladManolache opened this issue Jul 1, 2013 · 0 comments
Open

Enhancement request - Variable annotation radius #6

VladManolache opened this issue Jul 1, 2013 · 0 comments

Comments

@VladManolache
Copy link

Hey there. First of all thanks a lot for a great library.

This is not a issue per say but a feature request ... I found no way of specifying.

I came across a situation in which i have to resize the circle in regard to gps accuracy... I think there should be a way to be able to update the radius (it shouldn't be hardcoded).

My problem is that i'm using this with a MKCircle and I can't make the two radiouses to coincide. How would you recommend i do this?

I'm using the following to get the current zoom level:

define MERCATOR_RADIUS 85445659.44705395

define MAX_GOOGLE_LEVELS 20

  • (double)getZoomLevel
    {
    CLLocationDegrees longitudeDelta = mapView.region.span.longitudeDelta;
    CGFloat mapWidthInPixels = mapView.frame.size.width;
    double zoomScale = longitudeDelta * MERCATOR_RADIUS * M_PI / (180.0 * mapWidthInPixels);
    double zoomer = zoomScale;
    if ( zoomer < 0 ) zoomer = 0;
    return zoomer;
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant