In my iPhone application, I am looking for a way to provide auto-complete address suggestions us开发者_C百科ing some free third party API's. The selections from these suggestions should be plotted on google maps.
The requirement is that these suggestion be dynamic so as soon as the user starts typing "Ca" I should provide suggestions like
California, US Canada Cafe Calgary, Alberta, Canada
etc.
How can I achieve this? Any suggestions would be appreciated.
I have previously made a wrapper for the geonames.org geocoding service which lets you search for locations based on some wildcard or "fluffy" terms as you are looking for. This ILGeoNames wrapper contains a sample application which shows a searchbar with the results being dynamically shown in a table view as you type.
You should be able to extract the essential search mechanism from the code and provide these results on a mapview.
The ILGeoNames classes are available from GitHub.
精彩评论