cancel(id)
Cancels a request using the provided request ID.
Declaration
cancel(id: number): boolean;Parameters
- id:
Pass the integer ID that returns from a call. Passing an invalid ID or the ID of a completed request has no effect.
Return Value
true if the server cancels the pending search request.
Discussion
Sometimes you need to cancel a request, either because a person initiates the cancellation or moves on to another activity. Cancel a search request by providing its request ID, which MapKit JS returns from a call to search(query, callback, options).