0
点赞
收藏
分享

微信扫一扫

Cannot read properties of undefined (reading ‘createIcon‘) ?

东言肆语 2022-02-18 阅读 268

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 时 就会报这样的错误吧 !

举报

相关推荐

0 条评论