-
destroy
()
inherited
- 自從:ArcGIS 適用於 JavaScript 4.17 的 API
銷毀視圖以及任何關聯的資源,包括其Map、彈出窗口和 UI 元素。一旦視圖被破壞,這些就不能再使用。為了防止這些組件被破壞,請在調用
destroy()
之前將它們從視圖中刪除。// remove popup and legend from the view so that they are not destroyed const popup = view.popup; view.popup = null; view.ui.remove(legend); // unset map from the view so that it is not destroyed const map = view.map; view.map = null; // destroy the view and any remaining associated resources view.destroy();
基本信息
以下是所在類或對象的基本信息。
AMD:
require(["esri/views/MapView"], (MapView) => { /* code goes here */ });
ESM:
import MapView from "@arcgis/core/views/MapView";
類:
esri/views/MapView
自從:用於 JavaScript 4.0 的 ArcGIS API
用法說明
MapView.destroy
函數(或屬性)的定義如下:
相關用法
- JavaScript ArcGIS MapView.constraints用法及代碼示例
- JavaScript ArcGIS MapView.takeScreenshot用法及代碼示例
- JavaScript ArcGIS MapView.when用法及代碼示例
- JavaScript ArcGIS MapView.highlightOptions用法及代碼示例
- JavaScript ArcGIS MapView.extent用法及代碼示例
- JavaScript ArcGIS MapView.whenLayerView用法及代碼示例
- JavaScript ArcGIS MapView.scale用法及代碼示例
- JavaScript ArcGIS MapView.toScreen用法及代碼示例
- JavaScript ArcGIS MapView.navigation用法及代碼示例
- JavaScript ArcGIS MapView.animation用法及代碼示例
- JavaScript ArcGIS MapView.widthBreakpoint用法及代碼示例
- JavaScript ArcGIS MapView.input用法及代碼示例
- JavaScript ArcGIS MapView.fatalError用法及代碼示例
- JavaScript ArcGIS MapView.hitTest用法及代碼示例
- JavaScript ArcGIS MapView.background用法及代碼示例
- JavaScript ArcGIS MapView.spatialReference用法及代碼示例
- JavaScript ArcGIS MapView.breakpoints用法及代碼示例
- JavaScript ArcGIS MapView.tryFatalErrorRecovery用法及代碼示例
- JavaScript ArcGIS MapView.rotation用法及代碼示例
- JavaScript ArcGIS MapView.center用法及代碼示例
- JavaScript ArcGIS MapView.on用法及代碼示例
- JavaScript ArcGIS MapView.container用法及代碼示例
- JavaScript ArcGIS MapView.graphics用法及代碼示例
- JavaScript ArcGIS MapView.goTo用法及代碼示例
- JavaScript ArcGIS MapView.popup用法及代碼示例
注:本文由純淨天空篩選整理自arcgis.com大神的英文原創作品 MapView.destroy。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。