在此記錄:
const url = require('../../assets/image/location.png');
pointMarker = new AMap.Marker({
// 后端返回的經(jīng)緯度
position: [monitorPointList.value[i].longitude, monitorPointList.value[i].latitude],
offset: new AMap.Pixel(-60, -60), //相對于基點的偏移位置
content: `<div class='outer'>
<img src="${url}" class="location_icon_inner"/>
</div>`,
});
// 沒有標記點也要顯示出地圖
pointMarker.setMap(map);
// 清除標記點
map.clearMap();