views:

42

answers:

1

Hi All,

I'm working on an app where I need to query Google for businesses near a current location. How do I go about storing them in an array? I don't want to exit the app and open Google Maps, I want to be able to display the addresses in a list format (Table View, I suppose).

Any help would be greatly appreciated.

Thanks! Thomas

Extra Info:

I send this url to Google:

NSString *url    =  [NSString stringWithFormat: @"http://maps.google.com/maps?q=ChevyDealers&near=%@",
[fullAddress stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];

I verified that it works by launching Google Maps with the URL built here. This is not the functionality that I want in the end product though.

A: 

How are you querying Google? Are you using an API?

Bryan Clark
Hi Bryan,I'm using MapKit. I send this URLNSString *url = [NSString stringWithFormat: @"http://maps.google.com/maps?q=ChevyDealersI verified that this works by launching Google Maps with this URL, but that's not what I want to do in the end product.Thanks,Thomas
Thomas
MapKit is really only going to let you plot and display the locations. You are most likely going to need to use the Google Maps API in order to get straight resultshttp://code.google.com/apis/maps/One you create your API URL, and get your results back. You can then put them in an array and send that data to a UITableView
Bryan Clark
Thanks! I'll post my results when I figure it out. Your comment was very helpful!
Thomas