main
xuechunyuan 3 years ago
parent e1662da04c
commit 078425a555
  1. 9
      src/App.vue
  2. 52
      src/views/components/pathMap.vue

@ -32,11 +32,12 @@
border: 0 !important;
background-color: transparent !important;
}
&:nth-child(9){
top:10px !important;
}
div {
img {
display: none;
}
img {
display: none;
}
.BMap_center {

@ -159,6 +159,7 @@ export default {
// })
this.markList.push(marker);
let sContent = `<div style="font-size:0.14rem;line-height:0.22rem;padding:0 0.05rem 0 0.15rem;">
<div id="close_${deviceId}" style="display:inline-block;color:#fff;font-size:0.16rem;font-weight:bold;width:0.18rem;line-height:0.18rem;cursor:pointer;text-align:center;float:right;">x</div>
<div style="display:flex;align-items:center;margin-bottom:0.15rem;font-style: italic;font-size:0.2rem;font-family: FZSK;">
<div style="color: #ffffff;margin-right:0.1rem;">${carNo}</div>
<div style="display:inline-block;color:${res.Data.SbcStatus == 3 ? "#ffffff" : "#062766"};background:${res.Data.SbcStatus == 3 ? "#1dd58e !important" : "#9ab3c6 !important"};width:0.65rem;text-align:center;border-radius:100px;font-size:0.16rem;padding:0.04rem 0;">${this.locationStatus[res.Data.SbcStatus]}</div>
@ -174,58 +175,13 @@ export default {
document.getElementById('btnPath_' + deviceId).addEventListener('click', () => {
this.queryPath(deviceId)
})
document.getElementById('close_' + deviceId).addEventListener('click', () => {
this.baiduMap.closeInfoWindow();
})
});
marker.addEventListener('click', () => {
this.openInfo(infoWindow, pt);
});
//
// if (index == this.carList.length - 1) {
// console.log('')
// let clusterLayer = new mapvgl.ClusterLayer({
// // minSize: 1, //
// // maxSize: 15, //
// // clusterRadius: 150, //
// // gradient: { 0: 'blue', 0.5: 'green', 1.0: 'red' }, //
// // maxZoom: 19, //
// // minZoom: 5, //
// // //
// // showText: true,
// // //
// minPoints: 1,
// // icon
// iconOptions: {
// width: 25,
// height: 25,
// icon: require("@/assets/images/car.png"),
// },
// enablePicked: true,
// onClick: (e) => {
// if (e.dataItem) {
// // dataItemchildren
// console.log(e.dataItem);
// if (e.dataItem.children == undefined) {
// let obj = e.dataItem.objdata;
// let lng = obj.resData.BaiduLng;
// let lat = obj.resData.BaiduLat;
// let pt = new BMap.Point(lng, lat);
// let sContent = `<div style="padding:0 10px 10px;font-size:14px;line-height:22px;">
// <div>${obj.carNo}</div>
// <div>${obj.res2Data}</div>
// <div>${obj.resData.GPSTimeStamp.replace("T", " ")}</div>
// <div>${this.locationStatus[obj.resData.SbcStatus]}</div>
// <div>${obj.resData.spd}km/h</div>
// <div style="display: inline-block;border: 1px solid #eee;border-radius: 3px;padding: 3px 8px;color: #0e94eb;cursor: pointer;" id="btnPath_${obj.deviceId}"></div>
// </div>`;
// this.openWindow(sContent, pt, obj.deviceId);
// }
// }
// },
// });
// this.view.addLayer(clusterLayer);
// clusterLayer.setData(this.viewData);
// }
})
})

Loading…
Cancel
Save