Victor
Victor

Reputation: 1623

Swift Mapkit center of view

Are there some way to move the figure (current location, aka blue dot) to the center of the map field (and not the center of the entire map)? Even thought it follows the figure

Upvotes: 1

Views: 572

Answers (1)

Rashwan L
Rashwan L

Reputation: 38833

Try this:

let span = MKCoordinateSpanMake(0.014, 0.014)
let region = MKCoordinateRegion(center: location, span: span)
mapView.setRegion(region, animated: true)

Change the MKCoordinateSpanMake if you want to modify the zooming.

Upvotes: 3

Related Questions