vue2:
var myIcon = new BMapGL.Icon(require("../assets/images/map/icon4.png"), new BMapGL.Size(40, 40));//引用图标
vue3
const imgUrl = new URL('./images/icon4.png', import.meta.url).href //引用图标
var myIcon = new BMapGL.Icon(imgUrl, new BMapGL.Size(40, 40));
var marker = new BMapGL.Marker(new BMapGL.Point(item.lon, item.lat), { icon: myIcon });//自定义图标
map3D.value.addOverlay(marker);//添加到地图上