I have a MapView and a SearchBar. I enter some place name into the search bar. I need the MapView to search for the place I entered and mark that place with an annotation. Can anyone suggest the best steps to do this?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use Google api and NSXMLParser to get the coordinates of the searched place and then add annotation at that particular coordinate
For NSXMLParser look at my answer in https://stackoverflow.com/questions/10845732/xml-parser-objective-c/10845892#10845892
You can use the following google api for getting the latlng
Now to add annotation you can follow my answer here How to set Map location from any city or place name
Hope this will help you 🙂