简体   繁体   中英

Is there any Apple API like google Place Search API?

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"

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

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.

在此处输入图片说明

在此处输入图片说明

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM