I am beginning developer in the world of Cesium. I have started out with the workshop tutorial and have been modifying it to my needs. I am however experiencing some performance problems regarding the kml loading.
I have a kml file of +-6MB with +-11000 locations in it. I am loading these locations as billboards. There is a considerable waiting time before they appear.
I wonder what the best way is to tackle this problem? The billboards are spread over a great area, so it could be possible to only load the billboards in the currently visible area. I have however no idea how to accomplish this.
Code example:
var kmlOptions = {
camera : viewer.scene.camera,
canvas : viewer.scene.canvas,
clampToGround : true
};
var flyingSitesKML = Cesium.KmlDataSource.load('./Source/SampleData/flyingsites.kml', kmlOptions);
flyingSitesKML.then(function(dataSource) {
viewer.dataSources.add(dataSource);
var flyingSites = dataSource.entities.values;
for (var i = 0; i < flyingSites.length; i++) {
var entity = flyingSites[i];
if (Cesium.defined(entity.billboard)) {
entity.billboard.verticalOrigin = Cesium.VerticalOrigin.BOTTOM;
entity.label = undefined;
entity.billboard.distanceDisplayCondition = new Cesium.DistanceDisplayCondition(10.0, 200000.0);
var cartographicPosition = Cesium.Cartographic.fromCartesian(entity.position.getValue(Cesium.JulianDate.now()));
var latitude = Cesium.Math.toDegrees(cartographicPosition.latitude);
var longitude = Cesium.Math.toDegrees(cartographicPosition.longitude);
}
}
});
Context:
I am trying to display all the paragliding launch sites in Europe.
**Cesium version**: [1.45]
Brave browser (tried firefox but it is even slower)