Contents

search(callback, options)

Fetches points of interest.

Declaration

search(
    callback: PointsOfInterestSearchDelegate,
    options?: PointsOfInterestSearchOptions,
): Promise<PointsOfInterestSearchResponse>;

Parameters

Return Value

A promise that resolves with a PointsOfInterestSearchResponse on success.

Discussion

The search(callback, options) method returns a set of points of interest within the region defined and matching the PointOfInterestFilter.

MapKit JS invokes the callback function on failure and success with two arguments, error and data that represent failure and success information, respectively. You may optionally provide a delegate object instead of a callback. If you call cancel(promise) before MapKit JS responds, the system doesn’t call the callback or delegate.