Problems loading big kmz files in cesium

Hi everyone, i'm new in Cesium and we are trying to migrate our GE based website to Cesium due to NPAPI problem. We have a lot of kmz/kml files with a size about of 5-6 MB and we need load it into Cesium but we are having problems when we try load them and i don't know what could be happening, first the screen is freezing and then (seconds ..) i can move the globe but it hasn't loaded anything.

In most of the samples is loading kmz files about size 1 MB and it works fine although there are a few lags problems but it doesn't matter because our main goal is to get load these "big" kmz files and we need some help, if someone can help us, we'd be thankful.

PD:Sorry for my possible grammar mistakes.

Thanks in advance.


Have you seen this demo?

I’m not sure what would be causing your problem. Can you paste a code sample?



Hi thanks for replying,

Yes, i've seen this demo and it works fine because they are small KMZ files,
however, if you test "big" KMZ files about 5MB you will see that Cesium fails loading. I test it by drag and drop in Cesium Viewer and code it like samples:

var viewer = new Cesium.Viewer('cesiumContainer');
            .then(function (dataSource) {


Performance of large KML files is often times enhanced by the use of Regions. Cesium’s KmlDataSource does not currently support Regions, though it is on the roadmap. Do your big files use regions?


No, actually we don't use regions in our KML files, so we could use it to improve performance but when will be available this feature on Cesium?


You are most likely running into memory limitations built into the browser. Even though you may only have a few megs of KMZ data, that can decompress into much much more and Cesium also has lots of room for improvement when dealing with large amounts of entities (> 20000). While Google Earth can get away with brute forcing loading lots of data, browser based apps have to be a lot smarter about doing things (this is the problem 3D Tiles is eventually going to fix).

That being said, you can try temporarily increasing the amount of memory usable by Chrome to see if it helps you or not. First, be sure you are using the 64bit version of Chrome. 32bit apps only address up to 4GB of RAM (and depending on OS it can be lower). Chrome has artificial per-tab memory limits for the JavaScript engine of around 1GB on 32 bit and 2GB on 64 bit. As you can see, just running 64 bit will get you more memory.

Assuming that’s still not enough, you can change the artificial limit by passing the --max-old-space-size to V8. This specifies the limit in megabytes. For example, if you want to raise the limit to 16GB you would run

chrome.exe --js-flags="–max-old-space-size=16384"

Don’t set the value to higher than the amount of RAM on your machine. You also have to make sure chrome is not running in any capacity when you launch or else the command won’t take. You can confirm this by checking the special chrome://version page, which lists command line arguments.

While this isn’t an ideal solution overall, it might confirm that memory is the issue. If you can share one of the problematic KMZ files, we’d be happy to use it for performance testing when we try to optimize these cases in the future.

I've tested you told me and nothing has improve, I installed 64 bits chrome version and ran it with the command: chrome.exe --js-flags="--max-old-space-size=2048" (i have only 4 GB of RAM) and the performance is the same, it fails.

This is one KMZ file you can test it.

Thanks for replying.

124_Tunel302Int_20150917.kmz (3.42 MB)

Hi Matthew ,

I have same issue my files are even bigger up to 60MB few of them.

How to deal with this? I am willing to setup a different server for my KML and cesium but cesium does not handle/parse this much of load.

How to deal with this.
I am willing to do anything but i need some way to make this happen.
Please advise.


Michael, sorry for taking so long to get back to you. I just posted a full explanation and reply in this thread: (it sometimes takes a minute for replies to show up once sent via email, but if it’s not there in a little while, let me know). Thanks.