4

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.

Jasarien
  • 58,279
  • 31
  • 157
  • 188

2 Answers2

4

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

Thanks to the question: 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

Community
  • 1
  • 1
Jasarien
  • 58,279
  • 31
  • 157
  • 188
1

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
  • 6,443
  • 2
  • 38
  • 59