每次都会出现,出现概率100%
- 发布:2020-07-04 22:01
- 更新:2022-09-10 22:22
- 阅读:4064
产品分类: uniapp/App
PC开发环境操作系统: Windows
PC开发环境操作系统版本号: 10
HBuilderX类型: 正式
HBuilderX版本号: 2.7.14
手机系统: Android
手机系统版本号: Android 10
手机厂商: 小米
手机机型: M8
页面类型: nvue
打包方式: 云端
项目创建方式: HBuilderX
操作步骤:
预期结果:
每次都会出现,出现概率100%
每次都会出现,出现概率100%
实际结果:
每次都会出现,出现概率100%
每次都会出现,出现概率100%
bug描述:
uni-app中的地图marker的callout,在点击markerA时,先前出现的markerB的callout不会消失
用HX3.1.2试下
-
回复 DCloud_Android_ST: 没有用title用callout是因为title样式太丑了,callout气泡好看一点,结果callout不支持同时只会显示一个?
2021-03-04 11:28
zwzz - coder
<template>
<view>
<map style="width: 100%; height:600rpx;" latitude="37.789845" longitude="112.566085" id="map1" :markers="cover" min-scale='9'></map>
</view>
</template>
<script>
export default {
data() {
return {
cover: [{
"address": "山西省太原市小店区恒大绿洲46商铺1007、1008号商铺",
"distances": 0.27266858165625574,
"id": 57,
"image": null,
"lat": 37.789845,
"lng": 112.566085,
"pharmacyAreaLevelId": "5",
"pharmacyCode": 101989,
"pharmacyName": "益源恒大绿洲二店",
"status": "OPEN",
"workBeginTime": "09:17:24",
"workEndTime": "18:17:27",
"width": 30,
"height": 35,
"joinCluster": false,
"latitude": 37.789845,
"longitude": 112.566085,
"title": "益源恒大绿洲二店",
callout:{
content:"益源恒大绿洲二店",
textAlign:"center",
borderRadius:15,
padding:5,
display:"BYCLICK"
},
}, {
"address": "山西省太原市体育南路210号龙海方舟花园住宅小区六号楼1001号",
"createTime": null,
"distances": 0.5282916221988558,
"id": 96,
"image": null,
"lat": 37.783993,
"lng": 112.570989,
"pharmacyAreaLevelId": "6",
"pharmacyCode": 101749,
"pharmacyName": "益源龙海方舟店",
"status": "OPEN",
"workBeginTime": null,
"workEndTime": null,
"width": 20,
"height": 23,
"joinCluster": false,
"latitude": 37.783993,
"longitude": 112.570989,
"title": "益源龙海方舟店",
callout:{
content:"益源龙海方舟店",
textAlign:"center",
borderRadius:15,
padding:5,
display:"BYCLICK"
},
}]
}
},
methods: {
}
}
</script>
<style>
</style>
3***@qq.com - fairy
<template>
<view>
<view class="map" v-if="polygonsArr.length>0 || covers.length>0">
<map style="width: 100%; height: 300px;" :scale='7.5' :latitude="latitude" :longitude="longitude"
:markers="covers" :polygons='polygonsArr' @markertap="markertap" @callouttap="callouttap">
</map>
</view>
</view>
</template>
<script>
export default {
data() {
return {
id: 0, // 使用 marker点击事件 需要填写id
title: 'map',
latitude: 40.29,
longitude: 116.5,
//标记点位置
covers: [{
callout: {
bgColor: "#272822",
borderRadius: 6,
color: "#fff",
content: "11111",
display: "BYCLICK",
padding: 6,
},
height: 25,
iconPath: "http://210.12.220.75:16008/oss/greenhouseplan/image/3e8b3758-590a-4b30-9e9d-0cc231403341.png"
id: 126,
latitude: "40.29173",
longitude: "116.744965",
width: 20,
},
{
callout: {
bgColor: "#272822",
borderRadius: 6,
color: "#fff",
content: "222222",
display: "BYCLICK",
padding: 6,
},
height: 25,
iconPath: "http://210.12.220.75:16008/oss/greenhouseplan/image/3e8b3758-590a-4b30-9e9d-0cc231403341.png"
id: 126,
latitude: "40.184606",
longitude: "116.264069",
width: 20,
},
],
// covers1: [],
///多边形
polygons: [],
polygonsArr: [],
}
},
methods: {
markertap(e) {
console.log(e, "点击标记点")
e.detail = e.detail.markerId
},
callouttap(e) {
console.log(e, "点击了气泡窗口")
// this.toPath('/pages/index/details?id=' + e.detail.markerId)
},
}
}
</script>
版本3.3.11.20220209
@DCloud_Android_ST
f***@163.com
同问,请问解决了吗
2021-06-07 13:52
zwzz
回复 f***@163.com: 没有吧
2021-06-17 16:43