Hi All,
I just started looking at Cesium as a Google Earth plug-in replacement. We have a GWT app that uses dynamically generated KML. I didn’t really want to re-code it for CZML, so was wondering if anyone knew how feasible it would be to update Cesium-GWT to support Cesium with KML.
Alos, it looks like KML support came in Cesium 1.7 and Cesium-GWT is based on 1.2, so I’m also wondering how many other changes will be needed to the GWT wrapper to support these more recent versions of Cesium.
If anyone has any experience in this area I would appreciate your input. Thanks in advance!
Hi Brad,
"simple" KML worked ok for me:
var dataSource1= new Cesium.KmlDataSource();
dataSource1.load('/folder/filename.kmz');
viewer.dataSources.add(dataSource1);
Code above i used for every kml i needed to load int Cesium
Problem is with .kml which do have <Network link> inside. They aren't supported yet but.
I'm trying to do some workaround...
Good luck!
Thank you for the response but maybe I was not clear with my question. I know there is KML support in native Cesium. I was asking about the Google Web Toolkit wrapper for cesium created by Rich Kadel, described here:
-
Does anyone know what level of effort it would take to have cesium-gwt updated to support the latest version of Cesium ? I.e. what major breaking changes have been made to the interface since cesium 1.2 ?
-
Once that is working, what level of effort would be involved to add a KML support to the GWT wrapper ?
Cesium looks great but we have a GWT app that will not be migrated to native JavaScript, and it needs KML support.
Thanks
I contributed to Cesium-GWT, and have also loaded KML using the standard Cesium JS API. I believe it could be as simple as cloning the repo, copying the existing CzmlDataSource class, renaming anything that references “CZML” to “KML”, and then rebuilding. All the actual KML manipulation is internal to Cesium itself, and the Cesium KmlDataSource class just takes a URL as input.
Beyond that, you’d have to look over the Cesium changelog to see what’s been deprecated or removed since 1.2, and compare that with the implementations in Cesium-GWT. This is admittedly one of the reasons why I’m looking towards rewriting my existing app’s GWT client in modern JS instead. Dealing with JS wrappers has simply become too much of a pain.
Note that Rich Kadel appears to have moved on, and the “official” repo now appears to be located at https://github.com/Harmonia-Holdings-Group/cesium-gwt .
Thanks Mark and Brad. This is helpful information thread for me. In fact, our team is also in the same situation as Brad. We are migrating Google Earth with Cesium in a GWT application and KML support is required for us.
Another question is that if Cesium GWT is still with Cesium 1.2, is there any task in-progress to upgrade to the latest Cesium?
I’m pretty sure this is one of those “the code’s available, add whatever you need” kind of situations. Rich wrote it when he had a need, I contributed something when I had a need, and that’s pretty much it.
Given that the Cesium JS API is reasonably stable at this point, most of what’s in Cesium-GWT should probably be okay, but again you’ll need to do some manual comparisons between the Cesium changelog and the actual Cesium-GWT source to see what’s not implemented and what might now be incompatible.
I too am migrating from GE Plugin and had some servlets generating dynamic kml. Although the KML datasource was easy to configure to connect to those servlets, I found the kml to czml conversion that was happening had some unfortunate side effects where the data did not have the same appearance in cesium as it did in google earth. I found it far simpler to migrate to generating dynamic czml. The documentation for czml writer is pretty much non existent and took some time to figure out how to use it appropriately, but I actually found it to be a simpler api to use then the kml writer api we had been using. Also I found that every geometry of a placemark was becoming its own entity, whereas when writing the czml myself i was able to produce a single entity that encapsulated all of the geometries.
I should also add that we are using gwt as well, and although I started with the cesium gwt project, it was horribly outdated, and I now have my own version of it that supports the capabilities that we presently using.