Arcgis地图添加文字标注
还是直接上代码
按需引入文件
esri
.loadModules([
"esri/graphic",
"esri/symbols/TextSymbol",
"esri/geometry/Point",
'dojo/domReady!',
])
.then(([
Graphic
,
TextSymbol
,
Point
]) => {
const showPoint
= data
.geometry
.getExtent().getCenter();
const pointLocation
= new Point(showPoint
);
const textsymbol
= new TextSymbol('测试');
textsymbol
.setColor('white');
let graphic
= new Graphic(pointLocation
, textsymbol
);
this.map
.graphics
.add(graphic
);
})
更多样式自己摸索吧,就说个最简单的添加标注
转载请注明原文地址: https://lol.8miu.com/read-34886.html