Contents

search(callback, options)

Fetches points of interest.

Declaration

search(
        callback: PointsOfInterestSearchDelegate,
        options?: PointsOfInterestSearchOptions,
    ): number | undefined;

Parameters

Return Value

This method returns a request ID (integer) that you can use with cancel(id) to cancel a pending request.

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(id) before MapKit JS responds, the system doesn’t call the callback or delegate.

See Also

Fetching points of interest