Questions tagged [mklocalsearch]

MKLocalSearch helps to find nearby local points of interest.

75 questions
2
votes
2 answers

MKLocalSearch on Swift init() doesn't work

i am trying to use MKLocalSearch Api in Swift. But I can't get it to work. The error is coming from var search:MKLocalSearch = MKLocalSearch.init(request) I read the documentation, and it state the method name is init(request:) I am not sure what…
RapTop
  • 141
  • 4
2
votes
2 answers

how to get Geocoding search results like iOS Maps

I wonder how a request looks like or which class is used to get results like searching with Apple Maps? I've tried: [geocoder geocodeAddressString:text completionHandler:^(NSArray *placemarks, NSError *error) that only seems to…
brainray
  • 12,512
  • 11
  • 67
  • 116
1
vote
1 answer

MKLocalSearchCompleter - Ignores region

I'm trying to make an address search using the MKLocalSearchCompleter. I've provided it with a region(Australia) but the provided region is completely ignored, I still get results from around the world. ... private var searchCompleter =…
kironet
  • 766
  • 2
  • 11
  • 27
1
vote
0 answers

iOS 13 MapKit: MKMapItem.pointOfInterestCategory is nil?

I am trying to get MKMapItem.pointOfInterestCategory on iOS 13 beta using this unit test: func testPointOfInterests() { let request = MKLocalSearch.Request() let mkSearchExpectation = expectation(description: "MKLocalSearch") //…
Gerd Castan
  • 6,275
  • 3
  • 44
  • 89
1
vote
1 answer

Unique ID of MKLocalSearch result?

My App shows the result of a MKLocalSearch query. The user can select such a place and say 'I like this place'. When the user searches again (after closing the App), how can my App know that the user already likes this place? Is there something in…
Gerd Castan
  • 6,275
  • 3
  • 44
  • 89
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

unable to show localsearchresponse data in table view in ios

I am working on a app using MapView now have an issue kindly help me to figure out. I placed a search bar when user types the name of a place then it gives suggestions based upon the string entered. Using mapkit, I am able to send query to default…
Guru Teja
  • 127
  • 2
  • 13
1
vote
1 answer

MKLocalSearch not working like Apple Maps search?

I have created a MapKit and trying to play around with MKLocalSearch. One thing I noticed in comparison to Apple Maps, is that mklocalsearch is restricted to 10 results. So how does Apple Maps display 15 suggestions under the search bar? Okay, on to…
DevilInDisguise
  • 360
  • 1
  • 4
  • 14
1
vote
0 answers

Forward geocode user input on iOS like Apple's Maps App does

I would like to enable the users of my iOS app to search for nearby locations (mainly streets and POIs). The behavior should be pretty much the same like when searching for an address in the native Apple Maps App. I first tried to implement this by…
Lars
  • 285
  • 1
  • 4
  • 11
1
vote
0 answers

MKLocalSearch returning results from outside region

I'm searching for places (would like to only show businesses if possible) like this: CLLocationCoordinate2D currentCenter = CLLocationCoordinate2DMake(self.locationManager.location.coordinate.latitude,…
Erik
  • 2,500
  • 6
  • 28
  • 49
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
vote
0 answers

UISearchbar filtering mapkit MKLocalSearchRequest only filter for specific locations

I have implemented a UISearchBar with MKlocalSearch that enables the user to search all locations within a region. I have parsed information in Json format that holds locations and the name of the business associated with that location and placed…
user3492592
  • 89
  • 12
1
vote
1 answer

Create a title for annotation from MKLocalSearch

I have added an MKLocalSearch and the pins are displaying correctly. The only problem is that the pins titles have both the name and address, were I only want the name. How would I change this. Here is the code I am using - -…
matthew
  • 467
  • 8
  • 23
1
vote
1 answer

MapKit: How to retrieve apartment number from the return value of MKLocalSearchResponse

I searched thoroughly online but couldn't find any discussion about this: The MKLocalSearchResponse object returned from a MapKit search is a collection of MKMapItem, which has the information of search results, e.g. City, state, country. A single…
Ascendant
  • 2,430
  • 3
  • 26
  • 34
0
votes
1 answer

MKErrorDomain error when performing MKLocalSearch.start

Any ideas why I might be getting the below error when starting an MKLocalSearch? I've looked everywhere and can't seem to find any information on this. The error being printed is (from the guard let): Failed searching for businesses: Error…
BiggRojo
  • 31
  • 5