我试了两个变量都不生效 , 我不知道是我用法有问题还是什么其它配置不对。模拟器使用的基础库是3.8.10 <map 组件里面我传递了 :makers="markers" > <cover-view slot="callout" v-if="markers.length > 0"> 在这个里面自己画了一个长方形的内容, 不知道是不是内容不会被碰撞生效, 实际效果就是都重叠着的. </cover-view> </map> 配置maker属性是这样的 this.markers.push({ ... zIndex: index, 'collision-relation': 'alone', collisionRelation: 'alone', // 换过together 都没有什么效果 customCallout: { anchorY: 0, anchorX: 0, display: 'ALWAYS' } ... }) 添加makers使用过以下两种方式, 两种同时用也试过, 最后的makers还是在互相遮挡. this.markers = [...this.markers] this._mapContext.addMarkers({ markers: this.markers })
避坑,marker 碰撞能力文档有问题?"collision-relation": "alone"collision-relation: "alone"我这边设置之后一直不生效。 改成collisionRelation: "alone" 后可以了
12-04