Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

iPhoneSpain

macrumors newbie
Original poster
Sep 27, 2009
28
0
Hi all!

Here´s my first post and hope I can get my doubt solved!

I am developing a new app where, after getting the current position (location API), I have to get nearby places. I´ve thought of three ways:

1) Get the KML or JSON file from a http request, i.e., http://maps.google.com/maps?q=pizza&near=37.3,-122&num=20&output=kml. Output can be kml or json. The problem is to parse this to use the info in that file. Is it better JSON or KML? NSXMLparser is the way to do this or there are any other options?

2) Use geoname API to get the same behavior as using google maps request (get the json or kml). I think I have to use this function, but don´t know how to make it work to find nearby places from a specific lat/long:

http://www.geonames.org/export/geonames-search.html

3) Use the google maps api (ajax) and use the ajax method from google to get this nearby places (can´t remember the function but I know it exists). The problem is that I need to use the info from this method outside the script which would have to be created to use that method and don´t know if that is possible (don´t know if I´m explaining myself correctly )

Sorry for such a long post but I´m a bit newbie and I need some help!

Thanks in advance!
 
I have done a similar process and used the kml process but I used NSXMLParser, but I think either way would be just as easy.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.