Create a gist now

Instantly share code, notes, and snippets.

@implementation MKMapView (ZoomLevel)
- (NSUInteger) zoomLevel {
return (21 - round(log2(self.region.span.longitudeDelta * MERCATOR_RADIUS * M_PI / (180.0 * self.bounds.size.width))));
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment