// polyline
const polylineGraphic = new Graphic()
polylineGraphic.geometry = {
type: 'polyline',
paths: [
[117.227239, 31.820586],
[116.227239, 33.820586]
]
}
polylineGraphic.symbol = new SimpleLineSymbol({
color: '#ff0000',
width: '2px',
style: 'solid'
})
// GraphicsLayer
const layer = new GraphicsLayer({
id: '123456',
graphics: [polylineGraphic]
})
window.customMap.map.add(layer)
标签:js4,layer,SimpleLineSymbol,const,polylineGraphic,---,arcgis,polyline,new
From: https://blog.csdn.net/QDxin_xyz/article/details/139535284