views:

907

answers:

3

Is it possible to display nearby businesses in mapkit? If not, how else can that be done?

Is there a way to display by category - restaurant, retail, museums?

Also, I don't think displaying traffic flow is available. Can anyone confirm?

+2  A: 

The current version of MapKit does not support such features.

It's main capabilities currently are:

  • a scrollable/zoomable map
  • reverse geocoding (get the address for some given lat/long coordinates)
  • add annotations (pins) at a given lat/long
  • show phone's current location
  • show Standard, Satellite, or Hybrid view

To display nearby businesses, you would have to:

  • query a third-party for that information which would ideally return lat/long coordinates
  • add annotations to the map using the returned coordinates
DyingCactus
Cool. Do you know what those third party services are called? What do I Google to find them in other words?
4thSpace
It's not something I've had to do yet but you could search for "map locations web service" or something similar. Also see: http://stackoverflow.com/questions/745182/maps-api-for-looking-up-businesses-near-co-ordinates. The answer on that question mentions the Yahoo map service. You could also call the Google Maps geocoding web service via http request. For example, query Google Maps for "businesses, CityNameHere, StateNameHere". This should return several placemark objects which you can then add to your MKMapView. See http://code.google.com/apis/maps/documentation/geocoding/index.html.
DyingCactus
Depending on what city you are in, and exactly what types of businesses you want, you might want to look into the foursquare API. The site itself is picking up a lot of steam and in the longterm may wind up being the best source for this kind of data
bpapa
Should note that in my experience the Google Maps API doesn't work with businesses, although I may have missed seeing such support.
bpapa
Just tested this with the Google api and bpapa is right. Unfortunately, it does not return what you'd want. You'll have to try another third party.
DyingCactus
Yahoo or Bing won't work if you want an interactive map right? mapkit only works with Google. Also, if I use a 3rd party feed for nearby businesses, how is that matched up with the area displayed on the google map?
4thSpace
If the 3rd party service provides either an address or a geolocation you can use the MapKit reverse geocoder or the Google Maps HTTP API to translate that into data that can be used to create MKAnnotations. Foursquare provides both of those data points, by the way. Seriously, if this is something for a foursquare city you should take a look, it's awesome.
bpapa
+1  A: 

This is an interesting and emerging business idea!

I live in Nordic region and there is an open Mashups especially for sweden. By open i mean, any one can request and get access to the content to find nearby Cafe / WiFi / Sushi restaurants etc..

BEGIN PLUG WARNING

Check my iphone application which fetches content from the mashups and display using MapKit!

END PLUG WARNING

And there is a commercial content provider called Info24 for nordic countries at the moment.

Prakash
They send the feed in geocode format, which is what mapkit likes?
4thSpace
A: 

Like DyingCactus said, it's not currently possible without using your own calls to one of the mapping service providers. There are options available, though.

One of them is CloudMade. They have a good iPhone library and support almost all of your requirements.

Check out the API at Cloudmade.com

Saurabh G
Thanks for the link. What is the difference in using Cloudmade.com vs. Yahoo or Bing for free to get nearby businesses? Does Yahoo and Bing work with mapkit just as easily as Google maps?
4thSpace
The primary difference is that Google/Yahoo!/Bing APIs are not in Objective-C or Cocoa frameworks. What this means is that you'd have to send in requests in a pre-determined format and receive responses using that or another format. The API cannot be used directly in an iPhone app. For example, you'd have to send a JS request to Google Maps, map the response to binary data -> nsimage, and then show the image. With Cloudmade, you could preserve most of the multitouch capabilities. I am sure there's a free alternative out there, too. Hope that helps!
Saurabh G
Thanks. >>I am sure there's a free alternative out there, too.<< If only that were true.
4thSpace