高德地圖API 自定義marker怎麼引入本地圖片

本地圖片用 require
看代碼ui

const icon = new AMap.Icon({
    size: new AMap.Size(51, 23),
    image: require('./car_icon.png'),
    imageSize: new AMap.Size(51, 23),
    anchor: 'center',
});
相關文章
相關標籤/搜索