企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
官方示例:https://developers.arcgis.com/javascript/latest/sample-code/sandbox/index.html?sample=widgets-basemapgallery ![](https://box.kancloud.cn/9334d164e7e908d3fad58aaf57e3d0c2_542x453.jpg) ``` require([ 'esri/Map', 'esri/views/MapView', 'esri/widgets/BasemapGallery' ], function(Map, MapView, BasemapGallery) { var map = new Map({ basemap: 'streets' }); var mapView = new MapView({ map: map, center: [102.9331224074, 25.1049040686], zoom: 13, container: 'js_map' }); var basemapGallery = new BasemapGallery({ view: mapView }); mapView.ui.add(basemapGallery, { position: "top-right" }); }); ```