I am using KML to display text on the map. When I run the code, I see the map and bunch of polygons. To see the text i need to zoom in. I am wondering if there is away to get the text right away with the polygons without actually needing to be zoomed in. i am attaching the screenshots of the results. Initial one is the result of running the code. Other images contain certain degree of roominess.
Hello,
It looks like the styling that hides the labels from a certain distance isn’t configurable from the KML. However, you can override it once the KML has loaded as follows:
var promise = Cesium.KmlDataSource.load(’/path/to/kml’);
promise.then(function(dataSource) {
viewer.dataSources.add(dataSource);
var entities = dataSource.entities.values;
for (var i = 0; i < entities.length; i++) {
var entity = entities[i];
if (Cesium.defined(entity.label)) {
entity.label.translucencyByDistance = undefined;
}
}
});
``
Best,
Hannah