b***@163.com
b***@163.com
  • 发布:2021-12-14 15:21
  • 更新:2021-12-20 11:58
  • 阅读:399

【报Bug】map使用聚合ios的markertap返回值为0

分类:uni-app

产品分类: uniapp/App

PC开发环境操作系统: Windows

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

HBuilderX类型: 正式

HBuilderX版本号: 3.2.16

手机系统: iOS

手机系统版本号: iOS 13.4

手机厂商: 苹果

手机机型: IphoneX

页面类型: nvue

vue版本: vue2

打包方式: 云端

项目创建方式: HBuilderX

操作步骤:
<template>  
    <div class="map_box">  
        <map class="map_box" id='myMap' :scale='center.scale' :longitude='center.longitude'  @markertap='markertap'   :latitude='center.latitude'>  

        </map>  
    </div>  
</template>  

<script>  
    export default {  
        onReady() {  

            this.mapContext = uni.createMapContext("myMap", this)  
            this.mapContext.initMarkerCluster({  
                    enableDefaultStyle: false,  
                    zoomOnClick: true,  
                    gridSize: 60,  
                    complete(res) {  
                    }  
                  });  

                  this.mapContext.on("markerClusterCreate", (e) => {  
                  });  
                  this.mapContext.on('markerClusterClick', (res) => {  
                  })  
                  this.mapContext.addMarkers({   
                    markers:[{id:1,longitude:114.308743,latitude:30.589295,joinCluster: true, }],  
                    clear: true,  
                    complete(res) {  
                        console.log(1111111111111)  
                    }  
                    })  
        },  
        data() {  
            return {  
                title: 'Hello',  
                center:{  
                    scale:10,  
                    longitude:114.308743,  
                    latitude:30.589295  
                },  
            }  
        },  
        onLoad() {  

        },  
        methods: {  
            markertap(e){  
                console.log(e)  
            }  
        }  
    }  
</script>  

<style>  
    .map_box{  
        width: 750rpx;  
        height: 1300rpx;  
    }  
</style>

预期结果:

markertap的返回事件 markerId=1

实际结果:

markertap的返回事件 markerId=0

bug描述:

2021-12-14 15:21 负责人:DCloud_iOS_XHY 分享
已邀请:
DCloud_uniAD_HDX

DCloud_uniAD_HDX

已确认在iOS上有问题

  • b***@163.com (作者)

    什么时候搞定一下。。。。

    2021-12-16 16:33

DCloud_iOS_XHY

DCloud_iOS_XHY

HX 3.3.2+ 版本已修复此问题

  • b***@163.com (作者)

    使用 3.3.2 Alpha

    getLocation使用高德、或者系统都返回如下:

    不支持某个提供者,如:不支持腾讯地图

    {

    "errMsg": "getLocation:fail Not Support Provider,https://ask.dcloud.net.cn/article/282",

    "errCode": -1503,

    "code": -1503

    }

    2021-12-22 10:48

  • DCloud_iOS_XHY

    回复 b***@163.com: 在单独发个帖子反馈一下吧

    2021-12-22 11:11

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