I just found another issue with KML network links and 2D scene mode. If I switch to 2D first, then load my KML doc with network links (refreshMode=onStop), it works ok until I zoom in beyond a certain threshold, at which point it starts to send a bounding box of 0,0,0,0. I can’t really share the data that we’re using, but if you’re unable to reproduce with your test data, let me know I’ll see if I can put together a sample that recreates what we’re seeing.
The same code sample from my other thread, https://groups.google.com/d/msg/cesium-dev/air2rOeFu8I/ogF3XgmUAAAJ should work for this issue too (reposted here for convenience.) To reproduce this issue, go to 2D mode before you click the ‘Load KML Network Link’ button. It should load without error. Open up the Network monitor in firefox, and zoom in a bit. Each time you stop moving the map, you should see a URL like ‘facilities.kml?BBOX=94.19218222698838,-66.01455726977245,-129.3571305399348,79.93261520625411’ get loaded. If you keep zooming in until you are about at the level where you can only see one US state, eventually you’ll see ‘facilities.kml?BBOX=0,0,0,0’. Sometimes you may need to zoom in a bunch then zoom out one notch and you’ll get the BBOX=0,0,0,0. If you zoom back out until you can roughly view the US, the BBOX suddenly works again. The code again:
`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 need anything else. Thanks,