I would like to set up a search feature that a user can type in a search for a city and it will zoom in on the city on the mapkit. I already have a mapkit with loads of annotations and a tableview of my annotations.
I don’t think i can add a search on my annotations so instead, can i just search cities and it will zoom in on cities and show the annotations in the city?
New to Xcode and any help including code examples would be much appreciated !!
I use Google’s Geocoding API to enable searching on a map in my apps. This API returns a bounding box for a good, appropriate zoom level for results. You can use this +
MKMapView‘ssetRegion:animated:method to show your result(s).Hope this helps!