How to zoom in double in MapKit

Issue #183

1
2
3
4
5
6
7
8
9
10
11
12
func zoomInDouble(coordinate: CLLocationCoordinate2D) {
let region = mapView.region
let zoomInRegion = MKCoordinateRegion(
center: coordinate,
span: MKCoordinateSpan(
latitudeDelta: region.span.latitudeDelta * 0.5,
longitudeDelta: region.span.longitudeDelta * 0.5
)
)

mapView.setRegion(zoomInRegion, animated: true)
}

Comments