直接肝代码
const billboards = () => {
const roadnamesSource = Cesium.GeoJsonDataSource.load(heilongjiangHotEffect);
roadnamesSource.then(datasource => {
viewer.dataSources.add(datasource)
var cameraentities = datasource.entities.values
cameraentities.forEach((entity, index) => {
entity.billboard = new Cesium.BillboardGraphics({
id: `${index}`,
image: '/image/logo.png',
rotation: 0,
sizeInMeters: false,
verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
horizontalOrigin: Cesium.HorizontalOrigin.LEFT,
scale: 0.5,
zIndex: 11,
eyeOffset: new Cesium.Cartesian3(0, 0, -10)
})
})
})
}
2.数据格式
3.效果