Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
this.busmap.pointUpdated.subscribe((bus: server.车辆实时坐标信息) => {
let bms = this.busmarkers.filter(v => v.onBoardid == bus.onBoardid);
if (bms == null || bms.length <= 0)
this.busmarkers.push({
onBoardid: bus.onBoardid,
marker: gcoord.transform([bus.经度, bus.纬度], gcoord.WGS84, gcoord.AMap),
label: {
offset: {
x: 0,
y: -30
},
content: bus.onBoardid.toString()
}
});
else
bms[0].marker = gcoord.transform([bus.经度, bus.纬度], gcoord.WGS84, gcoord.AMap);
});
}