9157654
9157654
  • 发布:2025-07-09 14:54
  • 更新:2025-07-09 14:58
  • 阅读:22

【报Bug】nvue页面map中心点不更新

分类:uni-app

产品分类: uniapp/App

PC开发环境操作系统: Windows

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

HBuilderX类型: 正式

HBuilderX版本号: 4.75

手机系统: 全部

手机厂商: 华为

页面类型: nvue

vue版本: vue3

打包方式: 云端

项目创建方式: HBuilderX

示例代码:

<map :latitude="latitude":longitude="longitude"></map>
const _this = this;
uni.getLocation({
type: 'gcj02',
success(res) {
console.log(res)
_this.latitude = res.latitude;
_this.longitude = res.longitude;
},
fail() {}
});

操作步骤:

按照上述代码在nvue页面中执行

预期结果:

希望可以直接将当前位置作为中心点

实际结果:

没有将当前位置作为中心点

bug描述:

在nvue页面中使用map想一键定位到当前位置,通过uni.getLocation重新给latitude和longitude赋值之后,无法将中心点定位到当前位置。

2025-07-09 14:54 负责人:无 分享
已邀请:
DCloud_UNI_yuhe

DCloud_UNI_yuhe

  • 9157654 (作者)

    好的,多谢

    2025-07-09 17:27

DCloud_UNI_yuhe

DCloud_UNI_yuhe

这个参数不是响应的,只有在地图创建的时候才会使用

要回复问题请先登录注册