當前位置: 首頁>>代碼示例 >>用法及示例精選 >>正文


JavaScript ArcGIS SceneView.ui用法及代碼示例


基本信息

以下是所在類或對象的基本信息。

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

ESM: import SceneView from "@arcgis/core/views/SceneView";

類: esri/views/SceneView

繼承: SceneView > View > Accessor

自從:用於 JavaScript 4.0 的 ArcGIS API

用法說明

SceneView.ui函數(或屬性)的定義如下:


公開視圖中可用的默認小部件,並允許您打開和關閉它們。有關詳細信息,請參閱DefaultUI

例子:

let toggle = new BasemapToggle({
  view: view,
  nextBasemap: "hybrid"
});
// Adds an instance of BasemapToggle widget to the
// top right of the view.
view.ui.add(toggle, "top-right");
// Moves the zoom and BasemapToggle widgets to the
// bottom left of the view.
view.ui.move([ "zoom", toggle ], "bottom-left");
// Removes all the widgets from the bottom left of the view
view.ui.empty("bottom-left");
// Removes the compass widget from the view
view.ui.remove("compass");
// Removes all default UI components, except Attribution.
// Passing an empty array will remove all components.
view.ui.components = [ "attribution" ];

相關用法


注:本文由純淨天空篩選整理自arcgis.com大神的英文原創作品 SceneView.ui。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。