MKLocalSearch helps to find nearby local points of interest.
Questions tagged [mklocalsearch]
75 questions
0
votes
1 answer
How do I save the results of a MKLocalSearch to an Array?
I am experiencing a bit of trouble, while working on my app in SwiftUI.
I want to append relevant data, summarized in an object, to an array and return this.
While returning the array, I could see by debugging, that it is empty. Debugging in the for…

Rene S
- 3
- 1
0
votes
0 answers
How can I get a list of results that are located WITHIN a MKCoordinateRegion?
I'm working in a real estate app like Zillow...I show a View with a list of properties and a map with annotations for each property.
I have an array of properties(each with lat/lon) and I calculate the MKCoordinateRegion after a MKLocalSearch. All…

Nat Serrano
- 472
- 1
- 4
- 17
0
votes
1 answer
MapKit local search results populate the table
I am trying to load the updated search results but it doesn't populate the table view.
I used this link https://www.thorntech.com/how-to-search-for-location-using-apples-mapkit/ which belongs to the previous versions but it still works very well…
0
votes
1 answer
Delaying Add Annotation Until Search Has Finished
so i've searched and found multiple articles regarding creation of unique annotations and pins but I think i'm missing something more fundamental, possibly using the annotationView function under the MKMapViewDelegate.
First off i'm very new to…

Fortaite
- 1
- 1
0
votes
1 answer
iOS MKLocalSearch causing crash
I am performing MKLocalSearch with a UISearchBar and a UITableView.
The first search always works great but if you try another one, the app crashes and I get an "index out of range error". Let me know if you need more info, thanks.
func…

TrevPennington
- 435
- 5
- 15
0
votes
1 answer
Using MKLocalSearch in Swift attaches a pin to the users location instead of the blue dot
I am new to coding and Stack Overflow, so forgive me if I do something wrong.
I am using MKLocalSearch to display locations specified by a string. I have a user and location, so everything is setup.
I have added MKLocalSearch to my app, and it works…

AM137200
- 3
- 3
0
votes
1 answer
MKMapItem Center for creating annotations
I am trying to perform an MKLocalSearch.Request() and display the result on my mapView similar to this tutorial however when I do the search the coordinates returned are off center from where they should be. Where the map displays Brooklyn as an…

TheRedCamaro3.0 3.0
- 781
- 6
- 26
0
votes
1 answer
Value of type 'UIViewController' has no member 'mapView'; did you mean 'loadView'?
I try to Search for locations using MKLocalSearchRequest in Swift4 (for ios 12). When I append thelocationSearchTable.mapView = mapViewat the end of viewDidLoad I get the error.
In ViewController
import UIKit
import MapKit
import…

Picker
- 688
- 1
- 7
- 7
0
votes
1 answer
Why is MKLocalSearch for "nearby restaurants" returning locations in different cities?
I'm building a a simple application that allows a user to save their location for later.
The Goal: A user pins their address when at a business, and we save the name of the business
My approach: I'm requesting the location from a locationManager.…

Richard Poutier
- 207
- 2
- 10
0
votes
1 answer
Passing data with a delegate from a closure
I have two view controllers and I am trying to pass data from one to the other. The data is returned from an MKLocalSearch closure. But I cannot seem to get my delegate method to run. I hope that someone can shed some light on this? I mocked up…

gfgruvin
- 435
- 1
- 4
- 8
0
votes
2 answers
Find nearby bars using swift and market
I have this piece of code and I want to save the locations which I get from the MKLocalSearch in an array, so I can use them later. Do you have any ideas how I can do that?
func searchForBarsAndRestaurants(searchFor: String){
let request =…

john evangelou
- 1
- 1
0
votes
1 answer
MKLocalSearch produces MKMapItems with no URL
I have an app that relies on the url property of the MKMapItem class.
In the past (as recently as a few months ago) I was able to do a local search for any US city and receive an MKMapItem instance which contained a URL for that location, such as a…

Yuri Brigance
- 542
- 4
- 13
0
votes
0 answers
Is there a request quota on `MKLocalSearchCompleter`?
I am using an instance of MKLocalSearchCompleter to get string predictions whenever the text in my search bar has changed. I run into one problem when I type too fast into the search bar or when I hold my thumb on the backspace key - I get the…

fja
- 1,823
- 1
- 15
- 28
0
votes
0 answers
Alternatives to MKLocalSearch?
I am trying to add Check In functionality to my app much in the way that FourSquare and Yelp have.
I've implemented CoreLocation and am able to reverse geocode the users address, but I would like to present the names of the establishments in the…

Martin Muldoon
- 3,388
- 4
- 24
- 55
0
votes
0 answers
Swift Pass LocalSearch Response to become listed annotations in UITableView
I have very little knowledge on data passes and need help on how to pass a LocalSearchResponse that has already populated a mapview to then use a UIButton to segue to a tableview to have those pin annotations to be listed.…

LBIMBA
- 43
- 8