1. A concise explanation of the problem you’re experiencing.
I need some help on how to properly use the KmlDataSource option, for example; where to store (host) my KML file. Can anyone help?
2. A minimal code example. If you’ve found a bug, this helps us reproduce and repair it.
var viewer = new Cesium.Viewer(“cesiumContainer”);
var options = {
camera: viewer.scene.camera,
canvas: viewer.scene.canvas };
var kmllayer = viewer.dataSources.add(Cesium.KmlDataSource.load(’…kmls\2011_caribou.kmz’, options));
My kmls folder is currently in my site root
3. Context. Why do you need to do this? We might know a better way to accomplish your goal.
I have 30 KML files that show a 3D heatmap with a predetermined style, each kml file represents a year. I have to find a way to animate the KML showing the change year by year in a web map. I found the CesiumJS and it seems like a viable option. Cesium ion works really well when I upload the data as a KMZ. It keeps the style and the correct height for each block, needless to say I’m pretty impressed with Cesium. However, do to licencing constraints I cannot use Cesium ion for the project. I want to use the KmlDataSource option in the CesiumJS library but I’m not sure what the best approach is for displaying my data. I’m very new to JavaScript and even newer to Cesium and I didnt really get a full grasp on how the KmlDataSource works.
4. The Cesium version you’re using, your operating system and browser.
Cesium 1.63.1
Windows 10
Preferably Google Chrome