I have a MKMapView
that has a UISearchBar
on the top, and I want the user to be able to type a address, and to find that address and drop a pin on it. What I don't know is how to turn the address string into longitude and latitude, so I can make a CLLocation
object. Does anyone know how I can do this?
相关问题
- How to Fix: Cannot assign value of type 'CLLoc
- MapKit Annotations not showing up on map
- is there any way of allowing zooming MKMapView onl
- Custom MKOverlayView/unmodified MKPolygonView is c
- Delegate must respond to locationManager:didUpdate
相关文章
- Zoom to fit current location and annotation on map
- Convert String to CLLocationCoordinate2D in swift
- how can I center my map on the annotation view onl
- MKannotationView with UIButton as subview, button
- Searching a TableView of annotations
- MKPolyLineRenderer change color without removing o
- Enabling and Disabling Annotation Dragging (On The
- iPhone - Image overlay MapKit framework?
For swift2
I used a similar approach like Vijay, but had to adjust one line of code.
region.center = placemark.region.center
didn't work for me. Maybe my code helps someone as well:You may find your answer in this question.
iOS - MKMapView place annotation by using address instead of lat / long By User Romes.
A Very simple solution. But only applicable on iOS5.1 or later.