chunk-vendors.js:2914 [Vue warn]: Error in mounted hook: "TypeError: (t.OverlayView || t.Overlay) is not a constructor"
found in
--->
chunk-vendors.js:15645 [system] TypeError: (t.OverlayView || t.Overlay) is not a constructor
chunk-vendors.js:2914 [Vue warn]: Error in beforeDestroy hook: "TypeError: Cannot read properties of undefined (reading 'setMap')"
found in
---> <MapPolygon>
-
map组件一直报这个是什么原因
3 个回复
2***@qq.com
有解决方案吗,我也是一直报这个错
1***@qq.com
同样的情况,一调用uni.chooseLocation方法,再公众号里面就会报错,地图就出不来
4***@qq.com
请问这个找到原因了吗
2024-10-11 17:38
2***@qq.com - 前端开发小菜鸡
需要在配置里填地图key
手动在模版 html 里引用脚本 \< script charset="utf-8" src="https://map.qq.com/api/js?v=2.exp&key=xxx" ></script>