views:

86

answers:

2

I have a requirement to show points of interest on a map within an iPhone app I am working on.

I'm using MapKit to display the maps and get the users location.

I've been unable to find a suitable webservice to retrieve places or points of interest (restaurants, shops, hotels, etc) to display on the map.

I know it can be done, because so many apps do it. How they do it, is what I'm trying to find out.

Things I've Tried

  • Cloudmade - not really a solution as their iPhone SDK requires you to use their maps instead of the Google ones in MapKit.

  • Google Places API - (confusing to me) The Places API homepage says that the service will be launched July 2010. Now my watch may be wrong, but isn't it September 2010 right now? I applied for an API key about a week ago but haven't gotten any response so far.

  • Google Map API webservices - Seems to provide geocoding and reverse geocoding, etc, but no relevant points of interest

  • Google Maps Javascript API - I'm able to get a JSON response by invoking one of the javascript APIs that returns a list of places based on a query and given location, but the JSON is invalid - the key names are not contained in quotes, and as such no parser (web or Objective-C) an parse the result. http://jsonlint.com complains about it being invalid and if I put quotes around the key names, it validates successfully.

Things I've Noticed

The App "Where To?" by FutureTap does exactly what I need - shows places on a map relative to current location.

I fired up Wireshark to see what it was doing, and it uses the Google Maps Javascript API (that's where I got the idea to try it in the first place). The only thing that confuses me is how do they parse the invalid JSON?

I usually overlook something simple, so I'm hoping someone can come along and slap me upside the head and show me what I missed - There has to be a simple solution to this.

+1  A: 

This is exactly what I have been looking for: http://code.google.com/apis/ajaxsearch/documentation/#fonje

Thanks to the question: http://stackoverflow.com/questions/896234/accessing-google-apis-from-iphone-native-app

Shame on me for not being better at searching Stack Overflow. :(

I wrote up my findings here: http://jasarien.com/?p=412

Jasarien
+1  A: 

The Compass Business Data API - http://compass.webservius.com - should have what you need. Try it with these parameters: &latFrom=...&latTo=...&lonFrom=...&lonTo=...&select=company,lat,lon,sic

Eugene Osovetsky
Looks comprehensive. Thanks :)
Jasarien