Issue with KML network links and switching between scene modes

Hello,

We’ve found an issue when switching between scene modes when we have a KML doc with network links loaded. Cesium immediately gives the following stack trace:

An error occurred while rendering. Rendering has stopped.
DeveloperError: radians is required. DeveloperError@https://host/Cesium/Build/CesiumUnminified/Cesium.js:1321:19 CesiumMath.toDegrees@https://host/Cesium/Build/CesiumUnminified/Cesium.js:2208:1 processNetworkLinkQueryString@https:/host/Cesium/Build/CesiumUnminified/Cesium.js:121856:63 KmlDataSource.prototype.update/<@https://host/mapping-widgets/Cesium/Build/CesiumUnminified/Cesium.js:122668:28 KmlDataSource.prototype.update@https://host/mapping-widgets/Cesium/Build/CesiumUnminified/Cesium.js:122634:9 DataSourceDisplay.prototype.update@https://host/mapping-widgets/Cesium/Build/CesiumUnminified/Cesium.js:114305:26 Viewer.prototype._onTick@https://host/mapping-widgets/Cesium/Build/CesiumUnminified/Cesium.js:170577:25 Event.prototype.raiseEvent@https://host/mapping-widgets/Cesium/Build/CesiumUnminified/Cesium.js:4707:17 Clock.prototype.tick@https://host/mapping-widgets/Cesium/Build/CesiumUnminified/Cesium.js:36960:9 CesiumWidget.prototype.render@https://host/mapping-widgets/Cesium/Build/CesiumUnminified/Cesium.js:165019:31 render@https://host/mapping-widgets/Cesium/Build/CesiumUnminified/Cesium.js:164422:25

If there is any additional information you need from us, let me know,

Thanks,
Rad Pike

Hello,

Could you attach a sample KML file that reproduces the problem? That would help us find out exactly what is causing the bug.

Thanks,

Hannah

Hi,

I modified the KML sample in sandcastle and I was able to reproduce the issue. My code is below, to see the error, click the ‘Load KML Network Link’ button, then switch to 2D and it should give the stack trace I gave above:

var viewer = new Cesium.Viewer(‘cesiumContainer’);
var options = {
camera : viewer.scene.camera,
canvas : viewer.scene.canvas
};

Sandcastle.addToolbarButton(‘Load KML Network link’,
function() {
var kmlText=’’ +
‘’ +
‘0’ +
‘0’ +
‘’ +
‘onStop’ +
‘0’ +
‘BBOX=[bboxWest],[bboxSouth],[bboxEast],[bboxNorth]’ +
‘’;
var dom = new DOMParser().parseFromString(kmlText, ‘text/xml’);
viewer.camera.flyHome(0);
viewer.dataSources.add(Cesium.KmlDataSource.load(dom, options));
});

Sandcastle.reset = function() {
viewer.dataSources.removeAll();
viewer.clock.clockRange = Cesium.ClockRange.UNBOUNDED;
viewer.clock.clockStep = Cesium.ClockStep.SYSTEM_CLOCK;
};

``

Let me know if you don’t see the same. I’m using firefox 43.0.1, FYI…

Thanks,
Rad

Great, thanks Rad! I can confirm this is a bug in Cesium. I’ve submitted an issue here so we can look into it: https://github.com/AnalyticalGraphicsInc/cesium/issues/3865
Having the code sample was really helpful, thanks for putting that together!

Best,

Hannah

Hello Rad,

This issue has been fixed and will be included in the upcoming Cesium 1.21 release on May 2.

Best,

Hannah