CesiumGS / CesiumGS/cesium

KMLDataSource with network links reports BBOX of 0, 0, 0, 0 in 2D

Open
#3,867 1 comment 0 reactions 0 assignees View on GitHub
category - kml type - bug
Dominant language
JavaScript
Stars
15.7k
Forks
3.9k
Avg merge
4d 6h
Merged PRs (30d)
34

Description

Reported on the forum: https://groups.google.com/forum/?hl=en#!topic/cesium-dev/mIEI2f8drkQ

If you zoom into the map in 2D and look in the Network tab at the xhr calls made, you'll see that around the point you're zoomed so a state fills the screen, the calls made have a bounding box of zero: `facilities.kml?BBOX=0,0,0,0`. If you zoom back out, the bounding box is correct.

``` javascript
var viewer = new Cesium.Viewer('cesiumContainer', {sceneMode: Cesium.SceneMode.SCENE2D});
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));
});
```

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue with KmlDataSource.load using the provided Sandcastle example and SceneMode.SCENE2D, then inspect the Network tab for the generated NetworkLink requests. Trace how the camera view becomes the BBOX query parameters; done means zooming in no longer produces BBOX=0,0,0,0 while zoomed near a state.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.