Cesium 1.14 and QuadtreePrimitive

I’ve notice that in the current version of Cesium (1.14) there was a lot of changes regarding the QuadtreePrimitive, respect the previous versions…

I now that QuadtreePrimitive is a low-level API that is not documented thought the fact that is considered as “private” API but, do someone from the Cesium staff explain what was done on that approach?

For example, this code does not work anymore

TileProvider.prototype.loadTile = function(context, frameState, tile) {

tile.data = {};

tile.data.boundingSphere3D = Cesium.BoundingSphere.fromRectangle3D(tile.rectangle);

tile.data.boundingSphere2D = Cesium.BoundingSphere.fromRectangle2D(tile.rectangle, frameState.mapProjection);

tile.center = Cesium.Rectangle.center(tile.rectangle);

tile.centerCartesian3 = Cesium.Cartesian3.fromRadians((tile.center.longitude),(tile.center.latitude), 0);

tile.code = tile.x + “-” + tile.y + “-” + tile.level;

tile.state = Cesium.QuadtreeTileLoadState.DONE;

tile.renderable = true;

return;

};

…seems that the contents that was in “tile.rectangle” now can be found under “tile[index].owner

Thx :slight_smile:

Umberto

Hi Umberto,

QuadtreeTile still has a rectangle property even in 1.14:

https://github.com/AnalyticalGraphicsInc/cesium/blob/1.14/Source/Scene/QuadtreeTile.js#L248

I think the problem you’re seeing is that the parameters to TileProvider.loadTile changed. See the new signature in GlobeSurfaceTileProvider:

https://github.com/AnalyticalGraphicsInc/cesium/blob/1.14/Source/Scene/GlobeSurfaceTileProvider.js#L433

Kevin