-
container
String
|
HTMLElement
inherited
表示包含小部件的 DOM 元素的 ID 或節點。該屬性隻能設置一次。以下示例都是使用小部件時的有效用例。
例子:
// Create the HTML div element programmatically at runtime and set to the widget's container const basemapGallery = new BasemapGallery({ view: view, container: document.createElement("div") }); // Add the widget to the top-right corner of the view view.ui.add(basemapGallery, { position: "top-right" });
// Specify an already-defined HTML div element in the widget's container const basemapGallery = new BasemapGallery({ view: view, container: basemapGalleryDiv }); // Add the widget to the top-right corner of the view view.ui.add(basemapGallery, { position: "top-right" }); // HTML markup <body> <div id="viewDiv"></div> <div id="basemapGalleryDiv"></div> </body>
// Specify the widget while adding to the view's UI const basemapGallery = new BasemapGallery({ view: view }); // Add the widget to the top-right corner of the view view.ui.add(basemapGallery, { position: "top-right" });
基本信息
以下是所在類或對象的基本信息。
AMD:
require(["esri/widgets/Popup"], (Popup) => { /* code goes here */ });
ESM:
import Popup from "@arcgis/core/widgets/Popup";
類:
esri/widgets/Popup
自從:用於 JavaScript 4.0 的 ArcGIS API
用法說明
Popup.container
函數(或屬性)的定義如下:
相關用法
- JavaScript ArcGIS Popup.content用法及代碼示例
- JavaScript ArcGIS Popup.classes用法及代碼示例
- JavaScript ArcGIS Popup.autoOpenEnabled用法及代碼示例
- JavaScript ArcGIS Popup.location用法及代碼示例
- JavaScript ArcGIS Popup.headingLevel用法及代碼示例
- JavaScript ArcGIS Popup.features用法及代碼示例
- JavaScript ArcGIS Popup.alignment用法及代碼示例
- JavaScript ArcGIS Popup.title用法及代碼示例
- JavaScript ArcGIS Popup.when用法及代碼示例
- JavaScript ArcGIS Popup.visibleElements用法及代碼示例
- JavaScript ArcGIS Popup.actions用法及代碼示例
- JavaScript ArcGIS Popup.open用法及代碼示例
- JavaScript ArcGIS Popup.fetchFeatures用法及代碼示例
- JavaScript ArcGIS Popup.dockEnabled用法及代碼示例
- JavaScript ArcGIS Popup.on用法及代碼示例
- JavaScript ArcGIS Popup.goToOverride用法及代碼示例
- JavaScript ArcGIS Popup.dockOptions用法及代碼示例
- JavaScript ArcGIS PopupTemplate.fieldInfos用法及代碼示例
- JavaScript ArcGIS Popup trigger-action事件用法及代碼示例
- JavaScript ArcGIS PopupTemplate.returnGeometry用法及代碼示例
- JavaScript ArcGIS PopupTemplate.expressionInfos用法及代碼示例
- JavaScript ArcGIS PopupTemplate.actions用法及代碼示例
- JavaScript ArcGIS PopupTemplate.content用法及代碼示例
- JavaScript ArcGIS PopupTemplate.title用法及代碼示例
- JavaScript ArcGIS PopupTemplate用法及代碼示例
注:本文由純淨天空篩選整理自arcgis.com大神的英文原創作品 Popup.container。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。