方案:通过设置entity.description修改显示内容
let entity = {
name: "video",
position: Cesium.Cartesian3.fromDegrees(116.20, 39.59),
label: {
text: "文字标签",
font: '500 30px Helvetica',
scale: 0.5,
style: Cesium.LabelStyle.FILL,
fillColor: Cesium.Color.WHITE,
pixelOffset: new Cesium.Cartesian2(-8, -35),
showBackground: true,
backgroundColor: new Cesium.Color(0.5, 0.6, 1, 1.0)
},
billboard: {
image: this.circle,
width: 50,
height: 50,
},
distanceDisplayCondition: new Cesium.DistanceDisplayCondition(0, 1000),
};
entity.description = '<div style="height: 360px;">' + '重写infoBox' + '</div>';
this.viewer.entities.add(entity);
