iOS - ¿Cómo limitar el MapView a una región específica?

Tengo el siguiente problema

Tengo un "mapa dibujado" (imagen) que agrego a MapView como una superposición. No hay problema con eso ... pero necesito limitar el MapView a la región de la superposición, por lo que un usuario no puede desplazarse / hacer zoom fuera de esta región ... pero debería ser posible desplazarse / hacer zoom dentro de los "límites" "de la superposición: significa que no puedo simplemente deshabilitar el zoom / desplazamiento para MapView.

¿Hay alguna idea / solución sobre este tema? La razón para usar MapView / -Kit es que necesito agregar varios PDI al mapa personalizado. Esto puede volverse más complejo cuando se usa ImageView + ScrollView para presentar el mapa personalizado.

He investigado mucho sobre este tema, pero no encontré una buena solución.

¡Se agradece cualquier ayuda!

aludos cordiales, Christian

Edit: Esta es nuestra solución: Usted proporciona una coordenada superior e inferior derecha para limitar el mapa. El nivel de zoom (mínimo) también es limitado. He desactivado la desaceleración y puedes salir un poco del mapa (para un mejor rendimiento / ux). Agregué un borde gris de ~ 1 km a la superposición para que el usuario no pueda ver el mapa del mundo original de google.

LimitedMapView.h:

#import <Foundation/Foundation.h>
#import <MapKit/MapKit.h>


@interface LimitedMapView : MKMapView <UIScrollViewDelegate>{

}

@property (nonatomic, assign) CLLocationCoordinate2D topLeftCoordinate;
@property (nonatomic, assign) CLLocationCoordinate2D bottomRightCoordinate;


@end

LimitedMapView.m:

#import "LimitedMapView.h"

@implementation LimitedMapView

@synthesize topLeftCoordinate, bottomRightCoordinate;

- (void)scrollViewDidZoom:(UIScrollView *)scrollView{

    if([super respondsToSelector:@selector(scrollViewDidZoom:)]) [super scrollViewDidZoom:scrollView];

    if ([self region].span.latitudeDelta > 0.002401f || [self region].span.longitudeDelta > 0.003433f) {

        CLLocationCoordinate2D center = self.centerCoordinate;
        MKCoordinateSpan span = MKCoordinateSpanMake(0.002401f, 0.003433f);

        self.region = MKCoordinateRegionMake(center, span);

    }

}

-(void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate{

    if([super respondsToSelector:@selector(scrollViewDidEndDragging:)]) [super scrollViewDidEndDragging:scrollView willDecelerate:decelerate];

    MKCoordinateRegion currentRegion = self.region;
    bool changeRegionLong = YES;
    bool changeRegionLat = YES;

    // LONGITUDE    
    if((currentRegion.center.longitude - (currentRegion.span.longitudeDelta/2)) < self.topLeftCoordinate.longitude) {

        currentRegion.center.longitude = (topLeftCoordinate.longitude + (currentRegion.span.longitudeDelta/2));

    } else if((currentRegion.center.longitude + (currentRegion.span.longitudeDelta/2)) > self.bottomRightCoordinate.longitude) {

        currentRegion.center.longitude = (bottomRightCoordinate.longitude - (currentRegion.span.longitudeDelta/2));

    } else {

        changeRegionLong = NO;

    }

    // LATITUDE    
    if((currentRegion.center.latitude + (currentRegion.span.latitudeDelta/2)) > self.topLeftCoordinate.latitude) {

        currentRegion.center.latitude = (topLeftCoordinate.latitude - (currentRegion.span.latitudeDelta/2));

    } else if((currentRegion.center.latitude - (currentRegion.span.latitudeDelta/2)) < self.bottomRightCoordinate.latitude) {

        currentRegion.center.latitude = (bottomRightCoordinate.latitude + (currentRegion.span.latitudeDelta/2));

    } else {

        changeRegionLat = NO;

    }

    if(changeRegionLong || changeRegionLat) [self setRegion:currentRegion animated:YES];

}

-(void)scrollViewWillBeginDecelerating:(UIScrollView *)scrollView{

    [scrollView setContentOffset:scrollView.contentOffset animated:YES];
}

@end

Respuestas a la pregunta(3)

Su respuesta a la pregunta