1

When I do a search for nearby restaurants using MKLocalSearch with a region of 1000 meters in radius, I get results that could be out of range by a few kilometers. Below is how I set the range in swift:

let center = CLLocationCoordinate2DMake(25.033671, 121.564427)
request.region = MKCoordinateRegionMakeWithDistance(center, 1000, 1000)
request.naturalLanguageQuery = "restaurant"

let localSearch = MKLocalSearch(request: request)
localSearch.start(completionHandler: ...)

The returned results are different from what you get with the "Search Here" button inside Apple Maps app.

In Apple Maps app, when searching for keywords such as "restaurant", there appears a button "Search Here" on the bottom where you could search nearby places, and the listed items are somewhat different from what I get with MKLocalSearch.

So my question is how to get similar search results as that of Apple Maps with MKLocalSearch?

royh
  • 51
  • 2
  • I thought this question could refs to this: https://stackoverflow.com/questions/43249382/mklocalsearch-doesnt-provide-the-same-results-as-search-in-native-apple-maps-ap – zx1986 Nov 14 '18 at 02:23

0 Answers0