views:

108

answers:

1

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?

+1  A: 

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.

Cannonade
thanks for your input can you just provide the tutorial for that or some source code ..
mrugen
@mrugen I notice that you have an 0% accept rate on the 13 questions that you have asked on StackOverflow for the two months you have been a member. Accepting answers and giving feedback to the people who help you on SO is a good way of providing positive reinforcement and ensuring that future questions are answered. It is also a good way of giving back to the site because you will be adding details that might help out someone in the future.
Cannonade
@mrugen In summary : Go accept and vote on some of the answers that people have given you. I would be happy to help once I can be sure that my help will be appreciated. :)
Cannonade
Ya now can you help .
mrugen
@mrugen Sure :). I'll update my answer with some details as soon as I get a chance. I am sure you will get more help for your other questions now that SO users can see your accept rate is > 0% (that is a big red flag generally).
Cannonade
ya ok waiting for your reply ...
mrugen
@mrugen I'll get back to you as soon as I can.
Cannonade
@mrugen I just updated with a link to the CurrentAddress sample. This will get you started on how to use the MKReverseGeocoder. I can also help you out with parsing the lat,lng from your URL if you need it?
Cannonade
Thanks Cannonade it really helped thanks a lot..
mrugen
@mrugen No Problem. I assume you are ok with the URL parsing bit?
Cannonade
ya ok with parsing , but can u give a sample code for cdata stuff i dont know parsing cdata type.
mrugen
@mrugen Not sure what you mean by CData stuff? Do you have the URL as an NSString?
Cannonade
ya the url @"http://earthquake.usgs.gov/eqcenter/catalogs/7day-M2.5.xml";in this images are in CData Block , how to get that images from CData part
mrugen