12

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"
clemens
  • 16,716
  • 11
  • 50
  • 65

2 Answers2

8

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

Jai Govindani
  • 3,181
  • 21
  • 26
  • 1
    Do you know if we have something like that from Apple but without using Maps? (my app only shows the closest restaurant information without using a map). Thanks a lot :) – Ricardo May 30 '15 at 10:46
  • Something like this? http://stackoverflow.com/questions/23034527/mklocalsearch-without-mkmapview – Jai Govindani Jun 03 '15 at 10:42
  • Do you know if there is an Apple Maps API that I can use to search for the closest university (for example) to a point coordinates? (like the Azure Maps API). – André Mar 28 '19 at 16:00
  • @JaiGovindani do you know if this API is also usable on the web or in a server environment? I see only swift in the documentation. – dcts Nov 02 '21 at 16:17
  • @Thomas https://developer.apple.com/documentation/mapkitjs – Jai Govindani Dec 07 '21 at 08:31
1

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.

Apekshit
  • 767
  • 2
  • 13
  • 27