-
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/Daylight"], (Daylight) => { /* code goes here */ });
ESM:
import Daylight from "@arcgis/core/widgets/Daylight";
類:
esri/widgets/Daylight
繼承: Daylight > Widget > Accessor
自從:用於 JavaScript 4.14 的 ArcGIS API
用法說明
Daylight.container
函數(或屬性)的定義如下:
相關用法
- JavaScript ArcGIS Daylight.classes用法及代碼示例
- JavaScript ArcGIS Daylight.visibleElements用法及代碼示例
- JavaScript ArcGIS Daylight.on用法及代碼示例
- JavaScript ArcGIS Daylight.dateOrSeason用法及代碼示例
- JavaScript ArcGIS Daylight.headingLevel用法及代碼示例
- JavaScript ArcGIS Daylight.when用法及代碼示例
- JavaScript ArcGIS Daylight.playSpeedMultiplier用法及代碼示例
- JavaScript ArcGIS Daylight.visible用法及代碼示例
- JavaScript ArcGIS Daylight.timeSliderSteps用法及代碼示例
- JavaScript ArcGIS Daylight用法及代碼示例
- JavaScript DataView.getInt16()用法及代碼示例
- JavaScript Date getYear()用法及代碼示例
- JavaScript Date.UTC()用法及代碼示例
- JavaScript DataView.setUint32()用法及代碼示例
- JavaScript Date toISOString()用法及代碼示例
- JavaScript DataView.getInt8()用法及代碼示例
- JavaScript Date.getTimezoneOffset()用法及代碼示例
- JavaScript Date.getUTCSeconds()用法及代碼示例
- JavaScript ArcGIS DataFile用法及代碼示例
- JavaScript Date toJSON()用法及代碼示例
- JavaScript Date.getUTCMonth()用法及代碼示例
- JavaScript Date toLocaleTimeString()用法及代碼示例
- JavaScript Date getUTCHours()用法及代碼示例
- JavaScript Date.toLocaleDateString()用法及代碼示例
- JavaScript Date setMinutes()用法及代碼示例
注:本文由純淨天空篩選整理自arcgis.com大神的英文原創作品 Daylight.container。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。