开发者

How can I find a city and show it on a MKMapView?

I'm developing an iPh开发者_运维技巧one 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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜