简体   繁体   中英

get city name by parsing in iphone sdk

From this url:

http://ws.geonames.org/findNearbyPostalCodes?lat=19.0176560&lng=72.8561780

I want is city name that is mumbai can somebody help me?

Once you have parsed out the latitude and longitude, you can use the MKReverseGeocoder to translate that location to meta data about that location. In that meta data, you will find the city name that you are after.

Update

Have a look at the Apple CurrentAddress sample app, this has an example of how you use the MKReverseGeocoder .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM