Use the following method to add some entities to the map. Some text in the label is not displayed, but when the map is zoomed, the text is displayed again. If the text background is set to transparent, the text is always displayed, but some text is Is the picture capped?
var entity = {
id:options.id || Util.generateUUID(),
position: Cesium.Cartesian3.fromDegrees(options.lon,options.lat,options.alt),
label: { //文字标签
text: options.title || ‘’,
font: options.font || ‘100 30px Helvetica’,
scale: options.textScale || 0.5,
style: Cesium.LabelStyle.FILL,
fillColor: options.fillColor || Cesium.Color.WHITE,
pixelOffset: new Cesium.Cartesian2(_textOffsetX,_textOffsetY), //偏移量
showBackground: false || options.showBackground,
backgroundColor:options.backgroundColor || new Cesium.Color(0.035,0.764,0.792, 0.7),
eyeOffset: new Cesium.Cartesian3(0, 0, -10)
},
billboard: { //图标
image: options.imagesUrl,
scale: options.imageScale || 0.5
},
properties:options.properties
}
viewer.entities.add(entity);