A utility object for initiating map-based searches and processing the results.


class MKLocalSearch : NSObject


Use an MKLocalSearch object to execute a single search request. You might use this class to search for addresses or points of interest on the map. Upon completion of the request, the object delivers the results to the completion handler that you provide.


Creating a Search Request

init(request: MKLocalSearch.Request)

Initializes and returns a search object configured with the specified parameters.

class MKLocalSearch.Request

The parameters to use when searching for points of interest on the map.

Performing the Search

func start(completionHandler: MKLocalSearch.CompletionHandler)

Starts the search and delivers the results to the specified completion handler.

typealias MKLocalSearch.CompletionHandler

A completion handler block for a search operation.

class MKLocalSearch.Response

The results from a map-based search.

var isSearching: Bool

A Boolean indicating whether the search is currently in progress.

func cancel()

Cancels an in-progress search operation.


Inherits From

Conforms To

See Also

Placemark Search

Searching for Nearby Points of Interest

Provide automatic search completions based on a user’s partial search query, and search the map for relevant locations nearby.

class MKLocalSearchCompleter

A utility object for generating a list of completion strings based on a partial search string that you provide.

class MKLocalSearchCompletion

A fully formed string that completes a partial string.