0

I would like to enter the city name in the UISearchBar,then the map will jump to the current city.

How to do it?

Federico klez Culloca
  • 26,308
  • 17
  • 56
  • 95
  • How do you want to deal with multiple cities with the same name? – Pekka Aug 18 '10 at 10:11
  • Duplicate? http://stackoverflow.com/questions/988060/how-do-i-do-geocoding-not-reverse-geocoding-on-iphone – Vegar Aug 19 '10 at 06:32
  • Duplicate? http://stackoverflow.com/questions/1140404/forward-geocoding-from-the-iphone/2444249#2444249 – Vegar Aug 19 '10 at 11:15

1 Answers1

0

You would need some kind of NSDictionary which would contain all of the city names with their map references (lat/long) maybe this could be integrated with google maps or some other mapping software. Otherwise you will need to attain or build the dictionary manually. Once you have the map reference you could scroll the map to the right location.

Xetius
  • 44,755
  • 24
  • 88
  • 123
  • Good suggestions, thank you. Can you tell me what function to send a request to google and accept the return values from google? thanks a lot. – user423829 Aug 19 '10 at 01:34
  • http://stackoverflow.com/questions/551886/integrate-google-maps-api-into-an-iphone-app – Vegar Aug 19 '10 at 11:17