MKLocalSearch.Request
The parameters to use when searching for points of interest on the map.
Declaration
class RequestOverview
You create an MKLocalSearch.Request object when you want to search for map locations based on a natural language string. For example, if your interface allows the user to type in addresses, place the typed text in this object and pass it to an MKLocalSearch object to begin the search process. When specifying your search strings, include a map region to narrow the search results to the specified geographical area.
When creating an MKLocalSearch.Request object yourself, set the naturalLanguageQuery property to an appropriate search string, as in the following example:
If your app uses an MKLocalSearchCompleter object to implement autocomplete support for user-supplied search strings, initialize your search request using the search completion that the user selects. In that case, use the init(completion:) method instead of the init() method to initialize your search request object. The completion object automatically provides the value for the naturalLanguageQuery property.