就在页面中使用地图控件,并调用uni.createMapContext

- 发布:2020-09-15 12:27
- 更新:2020-10-26 16:15
- 阅读:1511
产品分类: uniapp/小程序/微信
PC开发环境操作系统: Windows
PC开发环境操作系统版本号: win10
HBuilderX类型: 正式
HBuilderX版本号: 2.8.11
第三方开发者工具版本号: 1.03.2008270
基础库版本号: 不知道哪里看1.0.0
项目创建方式: HBuilderX
操作步骤:
预期结果:
在模拟器中也能正常使用
在模拟器中也能正常使用
实际结果:
报错
报错
bug描述:
代码里调用uni.createMapContext,跑起来后,在微信开发者工具中,这行报错,但是预览通过手机打开是正常的。
报错内容:
2VM686:1 [Vue warn]: Property or method "toJSON" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property. See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.
(found in pages/homePage/homePage.vue)
console.error @ VM686:1
warn @ vendor.js:2429
warnNonPresent @ vendor.js:3831
get @ vendor.js:3886
sync @ VM16 asdebug.js:1
u @ VM16 asdebug.js:1
value @ instanceframe?s=1600143366555:1
initMap @ homePage.js:348
onLoad @ homePage.js:250
invokeWithErrorHandling @ vendor.js:3674
Vue.call_hook @ vendor.js:7675
_vue.default.call_hook @ vendor.js:1519
pageOptions.methods.onLoad @ vendor.js:1698
(anonymous) @ VM691 WAService.js:2
p.callPageLifeTime @ VM691 WAService.js:2
Dt @ VM691 WAService.js:2
(anonymous) @ VM691 WAService.js:2
Mt @ VM691 WAService.js:2
(anonymous) @ VM691 WAService.js:2
(anonymous) @ VM691 WAService.js:2
i.emit @ VM691 WAService.js:2
emit @ VM691 WAService.js:2
(anonymous) @ VM691 WAService.js:2
i.emit @ VM691 WAService.js:2
emit @ VM691 WAService.js:2
(anonymous) @ VM691 WAService.js:2
(anonymous) @ VM691 WAService.js:2
i @ VM16 asdebug.js:1
c @ VM16 asdebug.js:1
(anonymous) @ VM16 asdebug.js:1
p @ VM16 asdebug.js:1
g @ VM16 asdebug.js:1
(anonymous) @ VM16 asdebug.js:1
_ws.onmessage @ VM16 asdebug.js:1
Show 4 more frames
VM686:1 [Vue warn]: Error in onLoad hook: "TypeError: Converting circular structure to JSON
--> starting at object with constructor 'Object'
--- property '_renderProxy' closes the circle"
(found in pages/homePage/homePage.vue)
console.error @ VM686:1
warn @ vendor.js:2429
Vue.config.errorHandler @ vendor.js:7618
globalHandleError @ vendor.js:3690
handleError @ vendor.js:3659
invokeWithErrorHandling @ vendor.js:3682
Vue.call_hook @ vendor.js:7675
_vue.default.call_hook @ vendor.js:1519
pageOptions.methods.onLoad @ vendor.js:1698
(anonymous) @ VM691 WAService.js:2
p.callPageLifeTime @ VM691 WAService.js:2
Dt @ VM691 WAService.js:2
(anonymous) @ VM691 WAService.js:2
Mt @ VM691 WAService.js:2
(anonymous) @ VM691 WAService.js:2
(anonymous) @ VM691 WAService.js:2
i.emit @ VM691 WAService.js:2
emit @ VM691 WAService.js:2
(anonymous) @ VM691 WAService.js:2
i.emit @ VM691 WAService.js:2
emit @ VM691 WAService.js:2
(anonymous) @ VM691 WAService.js:2
(anonymous) @ VM691 WAService.js:2
i @ VM16 asdebug.js:1
c @ VM16 asdebug.js:1
(anonymous) @ VM16 asdebug.js:1
p @ VM16 asdebug.js:1
g @ VM16 asdebug.js:1
(anonymous) @ VM16 asdebug.js:1
_ws.onmessage @ VM16 asdebug.js:1
VM686:1 TypeError: Converting circular structure to JSON
--> starting at object with constructor 'Object'
--- property '_renderProxy' closes the circle
at JSON.stringify (<anonymous>)
at Object.sync (VM16 asdebug.js:1)
at Object.u [as beforeinvoke] (VM16 asdebug.js:1)
at Proxy.value (instanceframe?s=1600143366555:1)
at VueComponent.initMap (VM110 homePage.js:402)
at VueComponent.onLoad (VM110 homePage.js:304)
at invokeWithErrorHandling (VM130 vendor.js:3498)
at VueComponent.Vue.call_hook (VM130 vendor.js:7127)
at VueComponent._vue.default.call_hook (VM130 vendor.js:1526)
at Ze.pageOptions.methods.onLoad (VM130 vendor.js:1701)
