在index.html中引入高德地图后,报错 ‘AMapUI‘ is not defined , ‘AMap‘ is not defined‘

先是试了把高德地图的引用放到body里发现没有用,后查明在在.eslintrc.js中配置如下

"globals": {
    "AMap": "true",
    "AMapUI":"true",
},

 如果没有.eslintrc.js文件则先安装一下

eslint --init

  

相关文章:

  • 2021-10-09
  • 2022-12-23
  • 2021-12-01
  • 2022-12-23
  • 2021-10-09
  • 2022-12-23
  • 2021-12-17
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-06-17
  • 2023-03-05
  • 2022-02-16
  • 2021-10-07
  • 2022-12-23
相关资源
相似解决方案