riku
2024-07-11 505798927f75c84693cc51becf16aa525503fc92
src/utils/map/marks.js
@@ -127,5 +127,19 @@
    }
    return layer
  },
  drawMarker(title, lnglat, img) {
    const marker = new AMap.Marker({
      position: new AMap.LngLat(lnglat[0], lnglat[1]), // 经纬度对象,也可以是经纬度构成的一维数组[116.39, 39.9]
      title: title,
      // offset: new AMap.Pixel(-13, -12),
      // anchor: 'center',
      icon: new AMap.Icon({
        image: img,
        imageSize: [30, 30]
      })
    })
    map.add(marker)
  }
}