1. A concise explanation of the problem you’re experiencing.
Since Cesium version 1.4x have problems with displaying points as KML ( from Geoserver ). Have three checkbox where I can on/off points as KML.
The problem is that when I turn on the KML points, the KML points are displayed only in current window screen area of the map. All points “outside” window map screen at the time of the “on” click aren’t visible as KML.
Interesting thing is that everything was fine in version 1.39, but not in newer versions (!)
2. A minimal code example. If you’ve found a bug, this helps us reproduce and repair it.
This is the code for a poi category “Histo” ( Layers -> POI -> Histo ), but the problems are the same for the rest of POI categories ( Alp huts and HPO/KT checkpoints )
…
var optionsKML = {
camera : viewer.scene.camera,
canvas : viewer.scene.canvas,
clampToGround: true
};
…
function poi1() {
if (dvorci) {
viewer.dataSources.remove(dvorci);
dvorci = null;
} else {
viewer.dataSources.add(Cesium.KmlDataSource.load(geoserverUrl + ‘/wms/kml?layers=castles_ruins_radi’, optionsKML))
.then(function(dataSource){
dvorci= dataSource;
});
}
};
Here are the live links to same code in different Cesium versions:
Cesium v1.39 - https://topomap.ddns.net//cesium139/apps/hrbh.html ---- working fine when u move the map
Cesium v1.43 - https://topomap.ddns.net//cesium143/apps/hrbh.html ---- KML point visible only in current map window
Best way to test it is to zoom into area of the National Park Brijuni - just search Brijuni, Croatia.
3. Context. Why do you need to do this? We might know a better way to accomplish your goal.
ATM this is, for me, the easiest way to display points attributes from Geoserver onto Cesium globe.
4. The Cesium version you’re using, your operating system and browser.
Cesium v1.43 , Windows 10 Pro x64, Chrome, FF, Edge