9***@qq.com
9***@qq.com
  • 发布:2022-09-27 17:44
  • 更新:2022-10-14 12:20
  • 阅读:238

【报Bug】uni.createMapContext(mapId,this) 返回位置对象所有方法全部为undefined(紧急求官方回复)

分类:uni-app

产品分类: uniapp/App

PC开发环境操作系统: Windows

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

HBuilderX类型: 正式

HBuilderX版本号: 3.6.4

手机系统: Android

手机系统版本号: Android 12

手机厂商: 华为

手机机型: /

页面类型: vue

vue版本: vue2

打包方式: 云端

项目创建方式: HBuilderX

示例代码:

onReady() {
var that = this;
this._mapContext = uni.createMapContext("myMap1", this);
console.log(this._mapContext.getScale())
},

全部为undefined

操作步骤:

onReady() {
var that = this;
this._mapContext = uni.createMapContext("myMap1", this);
console.log(this._mapContext.getScale())
},

全部为undefined

预期结果:

onReady() {
var that = this;
this._mapContext = uni.createMapContext("myMap1", this);
console.log(this._mapContext.getScale())
},

全部为undefined

实际结果:

onReady() {
var that = this;
this._mapContext = uni.createMapContext("myMap1", this);
console.log(this._mapContext.getScale())
},

全部为undefined

bug描述:

onReady() {
var that = this;
this._mapContext = uni.createMapContext("myMap1", this);
console.log(this._mapContext.getScale())
},

全部为undefined

2022-09-27 17:44 负责人:无 分享
已邀请:
DCloud_UNI_GSQ

DCloud_UNI_GSQ

其他版本是否正常?

  • 9***@qq.com (作者)

    您指的是什么版本?

    2022-09-27 18:04

  • 9***@qq.com (作者)

    vue 还是 hbuilder 呢?

    2022-09-27 18:05

  • 9***@qq.com (作者)

    vue 页面 $getAppMap() 获取也是undefined

    2022-09-27 18:09

DCloud_UNI_WZF

DCloud_UNI_WZF

getScale() 是异步的,在回调函数中获取结果

要回复问题请先登录注册