Questions tagged [mklocalsearchrequest]

An MKLocalSearchRequest object is a utility object that you use to specify map-based search parameters.

An MKLocalSearchRequest object is a utility object that you use to specify map-based search parameters. After creating an instance of this object, you can assign a natural language string containing the address or point-of-interest to search for. You can also specify a specific map region to narrow the search results. You then use the configured object to initialize an MKLocalSearch object and perform your search.

23 questions
23
votes
1 answer

Search for Place Names (City/Town) Using MKLocalSearchCompleter

I'm trying to build a autocomplete textfield which needs to display the city/town name only. So what I want to do is that when someone enters Am it will show Amsterdam Amstelveen So it will only display the actual city names and nothing beyond…
NoSixties
  • 2,443
  • 2
  • 28
  • 65
8
votes
1 answer

Adding items into Objects

I'm looking to be able to append a personal location into the MKLocationSearchCompletion array that will can be found when the user searches through the search bar. However, I am having trouble understanding how items are stored into objects and…
Kevin
  • 1,189
  • 2
  • 17
  • 44
8
votes
1 answer

How to identify the MKMapItem from MKLocalSearchCompletion object in iOS9.3?

Apple introduced the MKLocalSearchCompleter and MKLocalSearchCompletion in iOS 9.3. I am trying to implement it. It becomes a two step process 1) enter partial term -> full search text is generated. 2) User selects one of these to search for the…
iosCurator
  • 4,356
  • 2
  • 21
  • 25
7
votes
2 answers

Swift - override tableview function - Method does not override any method from its superclass

I want to implement UISearchController, going step by step using this tutorial: Search for places using MKLocalSearchRequest and display results with UISearchController And in this section... Search for locations using MKLocalSearchRequest ...I have…
Rurom
  • 253
  • 3
  • 18
7
votes
1 answer

MKLocalSearch doesn't provide the same results as search in native Apple Maps app

When I search in MKLocalSearch and Apple Maps using the same string I get different results, usually in Apple Maps I get a lot of different locations but in MKLocalSearch I get only one. Apple Maps: My app using MKLocalSearch: In both cases I was…
6
votes
3 answers

MKLocalsearchRequest nearby places WITHOUT a naturalLanguageQuery string

Is it all possible to show nearby places with MKLocalSearchRequest without supplying a naturalLanguageQuery? I'm aware that the typical route is to use foursquare or google for this. I've used both.
Jordan Brown
  • 293
  • 1
  • 4
  • 16
5
votes
5 answers

MapKit Define the desired type of search results (Country, city, region, etc)

For an app i'm building, I want to implement a feature that allows users to specify the geographical origin of wines (country (e.g. France), region (e.g. Bordeaux), subregion (e.g. Paullac)). I want to make sure that I don't have to add all…
Joris416
  • 4,751
  • 5
  • 32
  • 59
4
votes
0 answers

MKLocalSearch not returning expected result

I am creating an iOS app and I have a requirement to create an appointment, similar to "Create Event" of the default Calendar app. I have to fill a location field, which will specify the location of the appointment and I am using…
raghvendra
  • 285
  • 5
  • 18
2
votes
1 answer

MKLocalSearch not finding all nearby restaurants

I implemented an MKLocalSearch within a certain region on the mkmapview that returns an array of restaurants within the region. Through research, only 10 restaurants are being shown. Is there's a way so that the MKLocalSearch can return more than 10…
Chris Gong
  • 8,031
  • 4
  • 30
  • 51
2
votes
1 answer

Batch Geocode MKLocalSearchResponse

I have a search setup that displays the response of a MKLocalSearchRequest in UITableVIew I want to clean up all the responses from the response of each search. Here is my shot at accomplishing this so far, inspired by this post Multiple Locations…
Jordan Brown
  • 293
  • 1
  • 4
  • 16
1
vote
1 answer

Making multiple map local searches synchronously

I try to make multiple searches synchronously (I mean one after the other, waiting for the previous request to complete before running the next one) and block till all the operations are complete before going ahead. But completion handle of the…
Stéphane de Luca
  • 12,745
  • 9
  • 57
  • 95
1
vote
0 answers

MapKit: MKLocalSearch gives incomplete responses

I have trouble using MapKit in Swift 5. There is a natural search query I'm using. If I type in specific streets it only gives me one or less options, while some of the used street names are used in several towns nearby. func updateSearchResults(for…
MyJBMe
  • 2,226
  • 4
  • 15
  • 21
1
vote
1 answer

Swift MapKit Autocomplete

I am trying to set an address autocomplete in my view controller so users do not have to type the whole address and instead select it from below the search textfield. This is how my controller looks like: import Foundation import UIKit import…
1
vote
1 answer

MKLocalSearch for nearby restaurants showing that of US and not current location

currently using apple's map view for iOS app when requesting a mklocalsearch request of type "restaurant" (to display nearby restaurants) all i am getting is the restaurants of the US when running on a device instead of getting nearby restaurants in…
1
vote
0 answers

Dropped Requests for MKLocalSearchRequest

When running the following code too often (e.g. every time a user enters text into a UISearchBar) it seems like the application stops servicing the requests. Does Apple have a burst limit on map requests? I also had one case where it blocked…
Jeff Nelson
  • 187
  • 1
  • 10
1
2