我正在使用以下代码来创建 GraphicsLayer:
const labelClass= {
symbol: { type: "text", color: "green", font: { family: "Sans", size: 12, weight: "bold" }},
labelPlacement: "above-center"
};
gl=new GraphicsLayer({ labelingInfo: [labelClass]})
app.map.add(app.gl);
然后使用以下代码向其中添加图标:
let graphic=new Graphic(
geometry:{ type: "point", lat, lon },
symbol:{ type: "picture-marker", url:"popover.png", width:19, height:13 },
});
gl.add(graphic);
如何告诉 arcGIS 用每个图标绘制什么文本?