<map id="myMap" style="width: 100vw; height: 100vh" :latitude="latitude" :longitude="longitude"
@markertap="clickMarkerPoint" :markers="markers" :polygons="polygons" :polyline="polyline"
:include-points="mini_points">
</map>
添加markers
this.markers.push({
id: i + 1,
width: 50,
height: 50,
latitude: res.data[i].lat,
longitude: res.data[i].lng,
iconPath: res.data[i].modelIcon
});
点击事件(没触发)
clickMarkerPoint(e) {
console.log(e)
if (e && e.markerId) {
if (e.markerId < 600000) {
// 车
this.bikeInfo = this.bikeList[e.markerId - 1]
this.popupType = 1
this.clickOpenModel()
} else {
// 停车区
this.currentFence = this.fenceList[e.markerId - 1 - 600000]
request.get('app/bs/fence/get/'+this.currentFence.id, {}).then((res) => {
this.currentFence=res.data;
this.convertPointToAddress(this.currentFence.centerPoint);
this.getCurrentLocation();
this.$refs.fencePopup.open();
}).finally(()=>{
uni.hideLoading();
});
}
}
},
1***@qq.com (作者)
写错了 是 uni-swiper-dot 这个控件有问题
2023-08-01 17:13