Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

SOLVED: Swift zoom in on location

codeislife:

I have an Address and I'm trying to use that address to show up on a mapview with the pin instead of having the actual coordinates. I can get it the map to show up with the pin but it is not zooming close enough on my location. Is there anyway I can zoom in on the location? Thanks in advance


@IBOutlet weak var mapView: MKMapView!

override func viewDidLoad() {
super.viewDidLoad()

let address = (community!["address"] as AnyObject)

let location : String = address as! String
let geocoder = CLGeocoder()
geocoder.geocodeAddressString(location) { (placemarks, error) in
if let placemarks = placemarks {
if placemarks.count != 0 {
let annotation = MKPlacemark(placemark: placemarks.first!)
self.mapView.addAnnotation(annotation)


}
}
}
}



Posted in S.E.F
via StackOverflow & StackExchange Atomic Web Robots
This Question have been answered
HERE


This post first appeared on Stack Solved, please read the originial post: here

Share the post

SOLVED: Swift zoom in on location

×

Subscribe to Stack Solved

Get updates delivered right to your inbox!

Thank you for your subscription

×