-4

enter image description hereI want to display the locations in UITableView. Here I take one UITextField and UITableView. Now I want to display the name of location in the table view according to the keyword typed in the text field. Any one know how to do that? Please help me friends. The table view should bring up suggested places because sometimes user might misspell the city name or there might be the same city name in different country.

on bases of above image You can understand what exactly i need.

freelancer
  • 1,658
  • 1
  • 16
  • 37

1 Answers1

1

What you want is geocoding. You can fairly easily integrate calls to Google's Geocoding API in your app - simply take the user input from the UITextField, send it in a request to Google, and parse the data that you get back to populate the data source for your UITableView. Google will even provide multiple suggestions in their response if there are multiple places that could match your query.

Tim
  • 59,527
  • 19
  • 156
  • 165
  • can i use uisearch bar to get input from user? – freelancer Apr 13 '12 at 13:51
  • Yes - just implement the [UISearchBarDelegate protocol](https://developer.apple.com/library/ios/#documentation/uikit/reference/UISearchBarDelegate_Protocol/Reference/Reference.html) to receive notification of text changes in your search bar. – Tim Apr 13 '12 at 13:53
  • Can u give me the link of any example or any tutorial like this if u have it than plz help me out. – freelancer Apr 13 '12 at 13:58
  • [Google is your friend](http://blog.sallarp.com/ipad-iphone-forward-geocoding-api-google/). – Tim Apr 13 '12 at 14:08