clearWatch
Summary
Stops a specific watch process.
Method of apis/geolocation/Geolocationapis/geolocation/Geolocation
Syntax
Geolocation.clearWatch(watchId);
Parameters
watchId
- Data-type
- unsigned long
The ID of the watch operation to cancel. This value is returned by the watchPosition method.
Return Value
No return value
Examples
geoLoc = navigator.geolocation;
watchID = geoLoc.watchPosition(successCallback, errorHandler, options);
geoLoc.clearWatch(watchID);
Notes
If the watchId parameter does not correspond to any watch process started by a previous call to the watchPosition method, this method returns and no further action is taken. Otherwise, the watch process identified by watchId is immediately stopped and no further callbacks must be invoked.
Related specifications
- W3C Geolocation Specification
- W3C Editor’s Draft
Attributions
Microsoft Developer Network: Windows Internet Explorer API reference Article