I am trying to display labels alongside polygons using the entity API. Here's some relevant code:
Sorry for the formatting...
from(Cesium.GeoJsonDataSource.load(data, options) as Promise<Cesium.GeoJsonDataSource>)
.pipe(
// Add datasource to cesium viewer - hiding it by default
tap(dataSource => (viewer.dataSources.add(dataSource), dataSource.show = false)),
// Add labels / polygon styling
tap(dataSource => {
dataSource.entities.values.forEach(entity => {
entity.polygon.material = Cesium.Color.RED.withAlpha(.3);
entity.label = {
text: 'test label',
font : '12px Helvetica',
};
});
})
);
I can see the polgons fine. But I can't see the labels. I am instantiating labels alongside polylines in a similar manner without any problems. I've also tried using the LabelGraphics class directly and assigning an instance of that class to the entity.label property to no avail.
Cesium version - 1.55
OS: CENTOS 7
Chrome - Version 72.0.3626.119 (Official Build) (64-bit)