企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
官方API:https://developers.arcgis.com/javascript/latest/api-reference/esri-views-ui-UI.html ![](https://box.kancloud.cn/90bd75291f6a814be81aaa5de627ceed_245x99.jpg) ~~~ require([ 'esri/Map', 'esri/views/MapView', 'esri/views/ui/UI', 'dojo/domReady!' ], function(Map, MapView, UI,) { var map = new Map({ basemap: 'streets' // dark-gray }); var mapView = new MapView({ map: map, container: 'js_map', center: [102.9331224074, 25.1049040686], zoom: 3, // rotation: -127.7 }); var divEle = document.createElement('div'); divEle.style.cssText = 'padding: 10px;border: 1px solid red;'; divEle.textContent = 'hello world !'; mapView.ui.add([ { component: divEle, position: 'top-right' } ]); }); ~~~ 方法: * add() * empty() * move() * remove()