0

I'm developing an iPhone application to search cities on a MKMapView. The user specify a city and then it show its location on a MKMapView. Is that possible?

Thanks.

VansFannel
  • 45,055
  • 107
  • 359
  • 626
  • possible duplicate of [Forward geocoding from the iPhone ](http://stackoverflow.com/questions/1140404/forward-geocoding-from-the-iphone) – kennytm May 29 '10 at 08:09
  • Perhaps, but as the forward geocoding is not available in iPhone, I'm try to do in other way. – VansFannel May 29 '10 at 08:43

1 Answers1

2

EDIT: iOS 5 now includes CLGeocoder, which will do just that for you.

You could use Google's Geocoder REST API. A request looks like this:

http://maps.google.com/maps/api/geocode/json?address=city&sensor=true_or_false

Since the response is in JSON format, you'll need a JSON parser.

samvermette
  • 40,269
  • 27
  • 112
  • 144
  • Thank you very much for your answer. I know that service. The problem is a paid service and I looking for something cheaper (is a paid service because I'm going to sell the application). Thanks again. – VansFannel May 30 '10 at 06:21
  • Google's Geocoder REST API is a free service. You don't even need an API key. I'm pretty sure you can sell an app that uses Google's Geocoder REST API. – samvermette May 30 '10 at 21:23
  • I've asked to Google, and this is his answer: There is no need to use a key if you are using the FREE service. If you use the free service, terms and conditions apply. These are mostly aimed at preventing people copying the data, and/or using the data outside of a Google branded application (e.g.a map), and/or reselling the free service. There are also speed and volume limits to prevent users hogging the service. If no-one can see the results of geocoding without buying your application, you are re-selling Google's service and should get a licence. – VansFannel May 31 '10 at 08:45