c***@gmail.com
c***@gmail.com
  • 发布:2024-04-01 10:00
  • 更新:2024-04-01 18:12
  • 阅读:156

【报Bug】高德地图在H5的tap事件,无法获取坐标轴

分类:uni-app

产品分类: uniapp/H5

PC开发环境操作系统: Mac

PC开发环境操作系统版本号: 13.0 (22A380)

HBuilderX版本号: 4.07

浏览器平台: Chrome

浏览器版本: 版本 123.0.6312.86(正式版本) (arm64)

项目创建方式: CLI

CLI版本号: 3.7.11

示例代码:

<map id="id" @tap="tap"></map>

操作步骤:

<map id="id" @tap="tap"></map>

预期结果:

<map id="id" @tap="tap"></map>

实际结果:

{
"type": "click",
"timeStamp": 0,
"detail": {
"x":undefined
"y": NaN
},
"target": {
"id": "NearbyLocation",
"offsetLeft": 0,
"offsetTop": 44,
"dataset": {},
"x":undefined
"y": NaN
},
"currentTarget": {
"id": "NearbyLocation",
"offsetLeft": 0,
"offsetTop": 44,
"dataset": {}
},
"touches": [
{
"force": 1,
"identifier": 0
}
],
"changedTouches": [
{
"force": 1,
"identifier": 0
}
],
"mp": {
"@warning": "mp is deprecated",
"type": "click",
"timeStamp": 0,
"detail": {
"x":undefined
"y": NaN
},
"target": {
"id": "NearbyLocation",
"offsetLeft": 0,
"offsetTop": 44,
"dataset": {},
"x":undefined
"y": NaN
},
"currentTarget": {
"id": "NearbyLocation",
"offsetLeft": 0,
"offsetTop": 44,
"dataset": {}
},
"touches": [
{
"force": 1,
"identifier": 0
}
],
"changedTouches": [
{
"force": 1,
"identifier": 0
}
]
},
"_processed": true
}

bug描述:

在H5中,tap事件点击之后,里面的坐标轴无法获取。

用的是高德地图,

2024-04-01 10:00 负责人:无 分享
已邀请:
JXWang

JXWang

根据官方文档,h5 的 tap 事件还不支持返回经纬度

  • c***@gmail.com (作者)

    "x":undefined

    "y": NaN


    我的本意是X和Y值,无法获取。


    我有看官方文档,是不支持经纬度。

    2024-04-03 17:04

要回复问题请先登录注册