公开视图中可用的默认小部件,并允许您打开和关闭它们。有关详细信息,请参阅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" ];
基本信息
以下是所在类或对象的基本信息。
AMD:
require(["esri/views/View"], (View) => { /* code goes here */ });
ESM:
import View from "@arcgis/core/views/View";
类:
esri/views/View
继承: View > Accessor
自从:用于 JavaScript 4.0 的 ArcGIS API
用法说明
View.ui
函数(或属性)的定义如下:
相关用法
- JavaScript ArcGIS View.popup用法及代码示例
- JavaScript ArcGIS View.tryFatalErrorRecovery用法及代码示例
- JavaScript ArcGIS View.when用法及代码示例
- JavaScript ArcGIS View.timeExtent用法及代码示例
- JavaScript ArcGIS View.whenLayerView用法及代码示例
- JavaScript ArcGIS View.graphics用法及代码示例
- JavaScript ArcGIS View.fatalError用法及代码示例
- JavaScript ArcGIS View.navigation用法及代码示例
- JavaScript ArcGIS View.input用法及代码示例
- JavaScript ArcGIS View.destroy用法及代码示例
- JavaScript ArcGIS View.on用法及代码示例
- JavaScript ArcGIS View.container用法及代码示例
- JavaScript ArcGIS View pointer-move事件用法及代码示例
- JavaScript ArcGIS Viewpoint.rotation用法及代码示例
- JavaScript ArcGIS View layerview-create-error事件用法及代码示例
- JavaScript ArcGIS ViewAnimation.when用法及代码示例
- JavaScript ArcGIS View immediate-click事件用法及代码示例
- JavaScript ArcGIS ViewAnimation用法及代码示例
- JavaScript ArcGIS View double-click事件用法及代码示例
- JavaScript ArcGIS View click事件用法及代码示例
- JavaScript ArcGIS View用法及代码示例
- JavaScript ArcGIS View key-down事件用法及代码示例
- JavaScript ArcGIS View drag事件用法及代码示例
- JavaScript ArcGIS View hold事件用法及代码示例
- JavaScript ArcGIS View mouse-wheel事件用法及代码示例
注:本文由纯净天空筛选整理自arcgis.com大神的英文原创作品 View.ui。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。