Currently I’m adding a polygon like this
viewer.entities.add({
polygon: {
hierarchy: new Cesium.PolygonHierarchy(myPositions)
}
});
``
To add a label to this polygon I extent this to this
viewer.entities.add({
label : {
text : ‘MyArea’
},
polygon: {
hierarchy: new Cesium.PolygonHierarchy(myPositions)
}
});
``
But label is not displayed now, because position is missing. Is there a possibility to show label at center of polygon like the Entity rectangle, which appears if you click on a Entity, without calculation of center of polygon by my own?