I have a card, and I draw a destination between two pins, and I also always open one call.
My problem is that I want to zoom out a bit, but I tried to do this with this code, and it didn't work.
let span = MKCoordinateSpanMake(0.0275, 0.0275) let coodinate = self.meLocation! let region = MKCoordinateRegion(center: coodinate, span: span) self.mapView.setRegion(region, animated: true)
I assume that creating a line for the destination makes the problem:
func mapView(mapView: MKMapView, rendererForOverlay overlay: MKOverlay) -> MKOverlayRenderer { let renderer = MKPolylineRenderer(overlay: overlay) renderer.strokeColor = UIColor(red: 2.0/255.0, green: 202.0/255.0, blue: 246.0/255.0, alpha: 1.0) renderer.lineWidth = 2.8 return renderer }
So my question is how can I zoom out by default.
EDIT:
I followed this guide
source share