Reputation: 1589
Another newbie iOS developer. I've got my code working to show local businesses by using request.naturalLanguageQuery = "Restaurants", but I want to return all businesses. I can't figure out what the wildcard character is. Seems like it would be so simple. Any help would be greatly appreciated.
var latitude:CLLocationDegrees = 40.7056258
var longitude:CLLocationDegrees = -73.97968
var latDelta:CLLocationDegrees = 0.01
var longDelta:CLLocationDegrees = 0.01
var span:MKCoordinateSpan = MKCoordinateSpanMake(latDelta, longDelta)
var location:CLLocationCoordinate2D = CLLocationCoordinate2DMake(latitude, longitude)
var region:MKCoordinateRegion = MKCoordinateRegionMake(location, span)
mapView.setRegion(region, animated: true)
let request = MKLocalSearchRequest()
request.naturalLanguageQuery = "Restaurants"
request.region = mapView.region
Upvotes: 1
Views: 1045
Reputation: 5128
I'd say that given the fact that this is the case for naturalLanguageQuery
:
This property can not be nil.
And no way is indicated to do a regex-based search, it's not possible. I'd check out another source of POI data for your task.
Upvotes: 1