There is a lot of questions and answers on stackoverflow about max zoom for MKMapView, for exmaple:
Is there way to limit MKMapView maximum zoom level?
Unfortunately non of the answers actually worked for me (or I just did not implement correctly). I was not able to simulate the behavior that native map has, that would be - restricting zoom level without 'bouncing' or resuming back.
This is my code that used:
- (void)mapView:(MKMapView *)mapView regionWillChangeAnimated:(BOOL)animated
{
if( mapView.region.span.latitudeDelta<0.001 || mapView.region.span.longitudeDelta<0.001){
MKCoordinateRegion region =mapView.region;
region.span = MKCoordinateSpanMake(0.001, 0.001);
mapView.region = region;
[mapView setRegion:mapView.region animated:NO];
}
}
When a user pinch and zoom map and the map reaches the max zoom (set by me), the map should not zoom in and then bounce back. Is it possible?