Issue with KML network links and switching between scene modes

82 views
Skip to first unread message

Rad Pike

unread,
Apr 18, 2016, 8:55:47 AM4/18/16
to cesium-dev
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


Hannah Pinkos

unread,
Apr 18, 2016, 10:27:12 AM4/18/16
to cesium-dev
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

Rad Pike

unread,
Apr 19, 2016, 11:51:09 AM4/19/16
to cesium-dev
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='<kml><NetworkLink>' +
           
'<name><![CDATA[Test]]></name>' +
           
'<refreshVisibility>0</refreshVisibility>' +
           
'<flyToView>0</flyToView>' +
           
'<Link><href><![CDATA[../../SampleData/kml/facilities/facilities.kml]]></href>' +
           
'<viewRefreshMode>onStop</viewRefreshMode>' +
           
'<viewRefreshTime>0</viewRefreshTime>' +
           
'<viewFormat>BBOX=[bboxWest],[bboxSouth],[bboxEast],[bboxNorth]</viewFormat>' +
           
'</Link></NetworkLink></kml>';
       
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

Hannah Pinkos

unread,
Apr 20, 2016, 10:26:16 AM4/20/16
to cesium-dev
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

Hannah Pinkos

unread,
Apr 21, 2016, 12:13:03 PM4/21/16
to cesium-dev
Hello Rad,

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

Best,

Hannah
Reply all
Reply to author
Forward
0 new messages