cesium立体广告牌代码
时间: 2023-11-12 19:49:43 浏览: 84
cesium立体广告牌的代码如下所示:
```javascript
let entity = window.viewer.entities.add({
position: window.Cesium.Cartesian3.fromDegrees(120.9677706, 30.7985748, 2.61),
billboard: {
image: require("@/assets/img/05.png"),
scale: 2.5,
width: 20,
height: 20
},
label: {
text: '测试名称',
font: '14pt Source Han Sans CN', fillColor: window.Cesium.Color.BLACK,
backgroundColor: window.Cesium.Color.AQUA,
showBackground: true,
style: window.Cesium.LabelStyle.FILL,
outlineWidth: 2,
verticalOrigin: window.Cesium.VerticalOrigin.CENTER,
horizontalOrigin: window.Cesium.HorizontalOrigin.LEFT,
pixelOffset: new window.Cesium.Cartesian2(10, 0)
}
});
window.viewer.zoomTo(entity);
```
希望以上代码对您有帮助!如果还有其他问题,请随时提问。
阅读全文