Domanda

In my iPhone App I am using MKMapKit. Currently I am plotting places on map according to the results get from Google Place API, but as per Google's doc I must use this values only in google Maps. Unfortunately from iOS 6, MKMapKit will go to Apple Map itself.

Is there any Apple API like google Place Search API?

Now I am using URLs like this:

https://maps.googleapis.com/maps/api/place/search/json?location=10.0036830,74.318723&rankby=distance&types=restaurant&sensor=false&key="my API Key"
È stato utile?

Soluzione

I believe this is what you're looking for? iOS Developer Library: MKLocalSearchRequest Class Reference

Altri suggerimenti

You can achieve this through MKLocalSearchRequest and MapKit.

It is showing autocomplete places just like google places API and can place the Annotation point on Apple's map (not on Google map, I hope that is only you are looking for.)

You can download a sample project from here, using MKLocalSearchRequest for fetching Places and showing in a auto complete tableview controller.

enter image description here

enter image description here

However it does not show as accurate result as you can get from Google Places API. As the problem is that Geocoding database is not obviously complete and Apple is not the company who leads this field - Google is.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top