arcgis api利用工具类,实现地图组的切换
引入BasemapGallery 类
import BasemapGallery from "@arcgis/core/widgets/BasemapGallery";
添加地图组
// 添加地图组,用于切换地图层 var basemapGallery = new BasemapGallery({ view: mapView, }); // 将地图组添加到右上方 mapView.ui.add(basemapGallery, { position: "top-right", }); // 地图组添加结束