I am trying to create custom data source with points and labels. When I use font property as ‘20px Arial’ label is half visible. I tried for different font sizes but it’s working for few values. Also when I add same labels and points as entities to viewer it’s working fine. Please find the below piece of code and attached screen shots. Please let me know if there is any bug in custom data source?
var viewer = new Cesium.Viewer(‘cesiumContainer’);
var customDatasource = new Cesium.CustomDataSource(‘custom’);
viewer.dataSources.add(customDatasource);
customDatasource.entities.add({
position : Cesium.Cartesian3.fromDegrees(-75.1641667, 39.9522222),
This looks like a z-fighing issue. You can move the label in front of the point using the eyeOffset property like this:
eyeOffset: new Cesium.Cartesian3(0,0,-300)