I have a swift application with MapView. These are my settings on the map bulletin board:

Also, in the code I am doing:
let regionRadius: CLLocationDistance = 10000 let initialLocation = CLLocation(latitude: latitude, longitude: longitude) centerMapOnLocation(initialLocation, map: cell.mapView, radius: regionRadius) cell.mapView.scrollEnabled = false cell.mapView.rotateEnabled = false
My centerMapOnLocation method first centers the map at a specific location:
func centerMapOnLocation(location: CLLocation, map: MKMapView, radius: CLLocationDistance) { let coordinateRegion = MKCoordinateRegionMakeWithDistance(location.coordinate, radius * 2.0, radius * 2.0) map.setRegion(coordinateRegion, animated: true) }
I want to allow the user to only zoom in / out to the exact gps coordinates.
Currently, the user cannot scroll the map, but he can rotate it, and also - he can double-click anywhere on the map, and he will zoom.
I want to turn off these options and make an effect when the user removes the map (or pinch) twice - it will only approach the original location.
How can I do this, and also - why does rotateEnabled = false not work?
source share