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