Limit the MapView to a certain area but still able to zoom in and out

876 views Asked by At

Is it possible that I limit MKMapView to a certain area but I can still zoom in and out on that area?

func mapView(mapView: MKMapView, regionDidChangeAnimated animated: Bool) {

        var span = MKCoordinateSpanMake(0.055, 0.055)
        var region = MKCoordinateRegion(center: CLLocationCoordinate2D(latitude: 7.466988, longitude: 134.562119), span: span)
        mapView.setRegion(region, animated: true)

    }
0

There are 0 answers