1***@qq.com
1***@qq.com
  • 发布:2022-08-13 15:00
  • 更新:2022-08-15 14:49
  • 阅读:500

【报Bug】nvue map地图openMapApp报错

分类:uni-app

产品分类: uniapp/App

PC开发环境操作系统: Windows

PC开发环境操作系统版本号: 21H2

HBuilderX类型: 正式

HBuilderX版本号: 3.5.4

手机系统: iOS

手机系统版本号: iOS 14

手机厂商: 苹果

手机机型: iphone Xs max , iphone13

页面类型: nvue

vue版本: vue3

打包方式: 云端

项目创建方式: HBuilderX

示例代码:

onReady() {
this.mapContext=uni.createMapContext("map", this)
},
methods:{
tap(){
console.log(this.mapContext?.openMapApp);
this.mapContext?.openMapApp({
longitude: "116.41086091015623",
latitude: "39.92284642963548",
destination:"测试",
success:(e)=>{
console.log(e);
},
fail:(e)=>{
console.log(e);
}
})
}
}

操作步骤:

map组件使用 uni.createMapContext("map", this).openMapApp

预期结果:

ios正常,android 正常

实际结果:

ios报错,android 正常

[JS Framework] Failed to invoke the event handler of "click" on u-text (29):
14:56:19.681 TypeError: e[t] is not a function. (In 'et', 'e[t]' is undefined) __ERROR

bug描述:

map组件使用 uni.createMapContext("map", this).openMapApp ios报错,android 正常

2022-08-13 15:00 负责人:天生DR 分享
已邀请:
DCloud_UNI_Anne

DCloud_UNI_Anne

问题复现,已反馈给相关人员排查,已加分感谢反馈!

  • while

    为啥我跟他一样的写法,调用这个方法直接进入fail回调了,"errMsg": "openMapApp:fail",安卓真机测试的,3.96最新版本

    2023-11-21 14:52

  • while

    是需要打开什么权限吗

    2023-11-21 14:52

  • while

                var mapContext = uni.createMapContext('maps', this)  
    console.log(mapContext)
    mapContext.openMapApp({
    latitude: Number(32.03804), //目标地址的纬度
    longitude: Number(118.730517), //目标地址的经度
    destination: '江苏省南京市鼓楼区集庆门大街',
    success(e) {
    console.log('success',e)
    },
    fail(e) {
    console.log('fail',e)
    },
    complete() {
    console.log('complete')
    }
    })

    2023-11-21 14:57

该问题目前已经被锁定, 无法添加新回复