MyJBMe
MyJBMe

Reputation: 2236

MapView look for Places

I have a UIMapView in my iPhone-app.

First I want to show streetnames on it.

Second I want to give the user the chance to look for places with an UISearchViewController.

Are there any tutorials for these 2 points and which service do you think is the best for finding places?

Upvotes: 0

Views: 89

Answers (1)

Oscar Salguero
Oscar Salguero

Reputation: 10365

You need to explore and understand Apple's MapKit Framework (https://developer.apple.com/library/ios/documentation/MapKit/Reference/MapKit_Framework_Reference/_index.html). To show stuff on the Map you can use MKAnnotations and MKLocalSearch to get points of interest around the user's location. The Documentation is super clear and has examples on how to get latitude/longitude, drop pins, pin-point user's location, add balloons with info (MKAnnotations), etc. Also, take a look at UISearchViewController documentation to see if it is the best for your use case.

Then, I would suggest you to take a look at Google Places Search API (https://developers.google.com/places/documentation/search) or Foursquare's API (https://developer.foursquare.com/docs/). At the end everything is about showing the info coming on a JSON response from one of the APIs on a List or on the Map with balloons.

If your data source ends up being Google Places... I would suggest you to use Google Maps for iOS instead of the native MapKit.

As for tutorials, there are probably 100s of them in the Interwebz... but I suggest you to start with Apple Documentation on MapKit understand that first and then try to mix it with other data sources.

Good luck and happy holidays!

Upvotes: 1

Related Questions