-
PausableWatchHandle
Object
表示当对象调用 watch() 时创建的 watch 。
例子:
let handle = watchUtils.pausable(map, 'basemap', function(newVal){ // Each time the value of `map.basemap` changes, it is logged in the console console.log("new basemap: ", newVal); }); // When pause() is called on the watch handle, the callback represented by the // watch is no longer invoked, but is still available for later use handle.pause(); // When resume() is called on the watch handle, the callback resumes // firing each time the watched property changes. handle.resume(); // When remove() is called on the watch handle, the map no longer watches for changes to basemap handle.remove();
基本信息
以下是所在类或对象的基本信息。
AMD:
require(["esri/core/watchUtils"], (watchUtils) => { /* code goes here */ });
ESM:
import * as watchUtils from "@arcgis/core/core/watchUtils";
对象:
esri/core/watchUtils
自从:用于 JavaScript 4.0 的 ArcGIS API
用法说明
watchUtils.PausableWatchHandle
函数(或属性)的定义如下:
相关用法
- JavaScript ArcGIS watchUtils.PromisedWatchHandle用法及代码示例
- JavaScript ArcGIS watchUtils.whenEqualOnce用法及代码示例
- JavaScript ArcGIS watchUtils.whenEqual用法及代码示例
- JavaScript ArcGIS wfsUtils.getCapabilities用法及代码示例
- JavaScript ArcGIS workers.open用法及代码示例
- JavaScript window.open()用法及代码示例
- JavaScript ArcGIS wfsUtils.getWFSLayerInfo用法及代码示例
- JavaScript window.close()用法及代码示例
- JavaScript ArcGIS SceneView double-click事件用法及代码示例
- JavaScript ArcGIS geometryEngineAsync.overlaps用法及代码示例
- JavaScript ArcGIS Expand.when用法及代码示例
- JavaScript ArcGIS Sublayer.JoinTableDataSource用法及代码示例
- JavaScript ArcGIS FillSymbol3DLayer.outline用法及代码示例
- JavaScript ArcGIS Ground.loadAll用法及代码示例
- JavaScript Object valueOf()用法及代码示例
- JavaScript ArcGIS LabelClass.repeatLabelDistance用法及代码示例
- JavaScript ArcGIS KMLLayerView.when用法及代码示例
- JavaScript ArcGIS Daylight.visibleElements用法及代码示例
- JavaScript Uint8Array.of()用法及代码示例
- JavaScript ArcGIS CIMSymbol.CIMTextSymbol用法及代码示例
- JavaScript new Legend用法及代码示例
- JavaScript Slider.effectiveMin用法及代码示例
- JavaScript Sketch.classes用法及代码示例
- JavaScript Sketch.visible用法及代码示例
- JavaScript ArcGIS AreaMeasurement3D.analysis用法及代码示例
注:本文由纯净天空筛选整理自arcgis.com大神的英文原创作品 watchUtils.PausableWatchHandle。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。