Skip to content

Enhancement request - Variable annotation radius #6

@VladManolache

Description

@VladManolache

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;
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions