Cannot read properties of undefined (reading ‘createIcon’)
出现这个问题 第一时间百度 百度 真是没啥用 ,谷歌搜索 有篇文章倒是有相同的问题 ?但不能解决我的问题 本以为很难 ,但请教别人的时候 慢慢 就发现了问题所在 ,
var marker = L.marker([this.site[i].lat, this.site[i].lng], {
draggable: true,
icon: mapIcon()
}).addTo(map);
当icon 赋值是undefined 时 就会报这样的错误吧 !