当前位置: 首页>>代码示例 >>用法及示例精选 >>正文


JavaScript ArcGIS Accessor.WatchHandle用法及代码示例


基本信息

以下是所在类或对象的基本信息。

AMD: require(["esri/core/Accessor"], (Accessor) => { /* code goes here */ });

ESM: import Accessor from "@arcgis/core/core/Accessor";

类: esri/core/Accessor

子类: ActionBase , ActiveLayerInfo , AddressCandidate , AddressCandidate , AggregatedGeometry , ApplicationProperties , ApplicationProperties , AreaMeasurement3DViewModel , AreasAndLengthsParameters , AreasAndLengthsParameters , Association , AssociationGeometriesResult , AttachmentInfo , AttachmentQuery , AttachmentQuery , AttachmentsViewModel , AttributeColorInfo , AttributionViewModel , AuthoringInfo , AuthoringInfoVisualVariable , Background , BarChartMediaInfo , BarcodeScannerInput , Basemap , BasemapGalleryItem , BasemapGalleryViewModel , BasemapLayerListViewModel , BasemapToggleViewModel , BasemapView , Bookmark , BookmarksViewModel , BufferParameters , BufferParameters , BuildingComponentSublayerView , BuildingExplorerViewModel , BuildingFilter , BuildingLevel , BuildingPhase , BuildingSublayer , BuildingSummaryStatistics , ButtonMenuItem , ButtonMenuViewModel , Callout3D , Camera , ChartMediaInfoValue , ChartMediaInfoValueSeries , ClassBreakInfo , ClosestFacilityParameters , ClosestFacilityParameters , ClosestFacilitySolveResult , ClosestFacilitySolveResult , CloudyWeather , Collection , ColorBackground , ColorRamp , ColorRamp , ColorSizeStop , ColorStop , ColormapInfo , ComboBoxInput , CompassViewModel , Content , Conversion , CoordinateConversionViewModel , CreateFeaturesWorkflowData , CreateWorkflowData , Credential , CustomTemplate , DataFile , DataFile , DataLayer , DataLayer , DatePickerViewModel , DateTimePickerInput , DaylightViewModel , DensifyParameters , DensifyParameters , DimensionalDefinition , DirectLineMeasurement3DViewModel , DirectionLine , DirectionPoint , DirectionsFeatureSet , DirectionsFeatureSet , DirectionsViewModel , DistanceMeasurement2DViewModel , DistanceParameters , DistanceParameters , Domain , Draw , DrawAction , Edges3D , EditorViewModel , Edits , Element , ElementExpressionInfo , ElevationProfileLine , ElevationProfileViewModel , Environment , ExpandViewModel , ExpressionInfo , ExpressionInfo , FacilityLayerInfo , FeatureEffect , FeatureEffect , FeatureFilter , FeatureFilter , FeatureFormViewModel , FeatureReductionCluster , FeatureReductionSelection , FeatureSet , FeatureSet , FeatureSnappingLayerSource , FeatureTableViewModel , FeatureTemplate , FeatureTemplatesViewModel , FeatureType , FeatureViewModel , Field , FieldColumn , FieldConfig , FieldGroupConfig , FieldInfo , FieldInfoFormat , FindParameters , FindParameters , FindResult , FindResult , FloorFilterViewModel , FlowRenderer , FoggyWeather , Font , FormTemplate , Format , FullscreenViewModel , FunctionResult , GPMessage , GPMessage , GamepadInputDevice , GamepadSettings , GamepadSettings , GeneralizeParameters , GeneralizeParameters , Geometry , GeometryFieldsInfo , Graphic , Ground , GroundView , HandleOwner , Handles , HeatmapColorStop , HeightModelInfo , HistogramViewModel , HomeViewModel , IdentifyParameters , IdentifyParameters , IdentifyResult , IdentifyResult , ImageAngleParameters , ImageAngleResult , ImageHistogramParameters , ImageHistogramParameters , ImageIdentifyParameters , ImageIdentifyParameters , ImageIdentifyResult , ImageIdentifyResult , ImageMediaInfo , ImageMediaInfoValue , ImageParameters , ImagePixelLocationParameters , ImagePixelLocationResult , ImageSample , ImageSampleParameters , ImageSampleResult , InitialViewProperties , InitialViewProperties , Input , InputField , InputFieldGroup , JobInfo , JobInfo , KMLSublayer , LOD , LabelClass , Layer , LayerFloorInfo , LayerListViewModel , LayerOptions , LayerView , LegendLayer , LegendLayer , LegendViewModel , LengthsParameters , LengthsParameters , LevelLayerInfo , Lighting , LineChartMediaInfo , LineOfSightTarget , LineOfSightViewModel , LineStyleMarker3D , LineStylePattern3D , LineSymbolMarker , LinearUnit , LinearUnit , ListItem , LocalBasemapsSource , LocateViewModel , Magnifier , Map , MapFloorInfo , MapImage , MeasurementViewModel , MeshComponent , MeshMaterial , MeshTexture , MosaicRule , NAMessage , NAMessage , Navigation , NavigationToggleViewModel , Network , NetworkElement , NetworkFeatureSet , NetworkUrl , OAuthInfo , OffsetParameters , OffsetParameters , OpacityStop , ParameterValue , ParameterValue , PieChartMediaInfo , PixelBlock , PointBarrier , PointCloudFilter , PointCloudRenderer , PolygonBarrier , PolylineBarrier , PopupTemplate , PopupViewModel , Portal , PortalFolder , PortalGroup , PortalItem , PortalItemResource , PortalQueryParams , PortalQueryResult , PortalRating , PortalUser , Presentation , PrintParameters , PrintParameters , PrintTemplate , PrintTemplate , PrintViewModel , ProjectParameters , ProjectParameters , Query , Query , RadioButtonsInput , RainyWeather , RasterColormapRenderer , RasterData , RasterData , RasterFunction , RasterInfo , RasterShadedReliefRenderer , RasterStretchRenderer , RelatedRecordsInfo , RelatedRecordsInfoFieldOrder , RelationParameters , RelationParameters , Relationship , RelationshipQuery , RelationshipQuery , Renderer , RouteInfo , RouteParameters , RouteParameters , RouteResult , RouteResult , RouteSolveResult , RouteSolveResult , ScaleBarViewModel , ScaleRangeSliderViewModel , ScaleRanges , SceneModification , Search , SearchLayer , SearchLayerField , SearchSource , SearchTable , SearchTableField , SearchViewModel , ServerInfo , ServiceAreaParameters , ServiceAreaParameters , ServiceAreaSolveResult , ServiceAreaSolveResult , ShadowCastViewModel , SiteLayerInfo , SizeStop , SketchViewModel , SlicePlane , SlicePlane , SliceViewModel , Slide , SliderViewModel , SnappingControlsViewModel , SnappingOptions , SpatialReference , StatisticDefinition , StatisticDefinition , Stop , StylePattern3D , Sublayer , SunnyWeather , SwipeViewModel , SwitchInput , Symbol , Symbol3DLayer , SynthesizeAssociationGeometriesParameters , Task , TemplateItem , TemplateItemGroup , TemplateOptions , Terminal , TerminalConfiguration , TextBoxInput , TileInfo , TileMatrixSet , TimeExtent , TimeInfo , TimeInterval , TimePickerViewModel , TimeSliderViewModel , TopFeaturesQuery , TopFilter , TraceLocation , TraceParameters , TraceResult , TrackViewModel , TravelMode , TrimExtendParameters , TrimExtendParameters , UI , UniqueValueInfo , UpdateWorkflowData , UtilityNetworkTraceViewModel , VectorFieldRenderer , View , ViewAnimation , ViewState , Viewing , Viewpoint , VisualVariable , WMSSublayer , WMTSStyle , WMTSSublayer , WeatherViewModel , Widget , Workflow , ZoomViewModel

自从:用于 JavaScript 4.0 的 ArcGIS API

用法说明

Accessor.WatchHandle函数(或属性)的定义如下:

WatchHandle Object


表示可以删除的监视或事件处理程序。

属性:
类型说明
remove Function

取下 watch 手柄。

例子:

let handle = reactiveUtils.watch(() => map.basemap, (newVal) => {
  // Each time the value of map.basemap changes, it is logged in the console
  console.log("new basemap: ", newVal);
});

// When remove() is called on the watch handle, the map no longer watches for changes to basemap
handle.remove();

相关用法


注:本文由纯净天空筛选整理自arcgis.com大神的英文原创作品 Accessor.WatchHandle。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。