SuperAPI AI 工具集

arcgis-widgets-ui

通用与其它

查看项目

更新于 10-16 01:10

技能介绍

用途:在 ArcGIS Maps SDK for JavaScript 项目中构建地图用户界面,组合微件、Map Components 与 Calcite 设计系统,实现图例、图层列表、搜索、要素表、时间滑块等交互控件。

主要能力:提供大量 Map Components(如 arcgis-map、arcgis-scene、arcgis-legend、arcgis-layer-list、arcgis-search、arcgis-feature-table、arcgis-time-slider、arcgis-expand 等)与对应 Core API 微件;支持通过 slot 定位(top-left、top-right、bottom-left、bottom-right、popup 等)、arcgis-expand 折叠容器、reference-element 引用地图外部组件,以及 Calcite 布局组件(calcite-shell、calcite-panel、calcite-action-bar 等)与明暗主题。

使用方式:官方建议优先使用 Map Components(Web Components),Esri 已将其作为主要方案。Map Components 通过 ESM 导入,例如 import "@arcgis/map-components/dist/components/arcgis-map";,CSS 随 npm 自动加载。Core API 微件需导入 @arcgis/core/widgets/... 并手动引入 @arcgis/core/assets/esri/themes/light/main.css。也可用 $arcgis.import 动态导入。微件可加入 view.ui 或指定 container,但不可同时使用两种方式。

适用场景:需要为 2D/3D 地图添加图层管理、搜索、属性表、时间序列、打印、测量、书签等界面功能的 Web 应用。

限制与注意:组件放在 arcgis-map 外部时必须设置 reference-element,否则无法找到视图;slot 名称须精确;Calcite 脚本需先加载;明暗模式需在 body 添加 calcite-mode-light 或 calcite-mode-dark;Core API 微件缺少 CSS 时需手动导入。资料未提供收费、价格或平台限制信息。