CesiumJS:如何放大图块集区域?

问题描述

我在 Windows 和 Cesium 1.72 上工作。 NodeJS 和 Cesium 运行良好。 我成功加载/显示一个tileset格式的3D图块(网格+相关纹理)。

但是,我希望在图块集显示时它会自动放大其抓地力。 目前,显示仍然是全局的,我不得不强制放大。

我附上了一个 SS 并粘贴在我很小的 javascript 脚本下面:

一个。你能告诉我为什么不考虑tileset上的缩放吗?

这可能是由于未正确填写“足迹”元数据?

在这种情况下,“debugShowBoundingVolume”函数是否值得关注? https://cesium.com/docs/cesiumjs-ref-doc/Cesium3DTileset.html

B.你能告诉我如何强制缩放自定义区域吗? (可能有坐标定义?和/或缩放级别的定义?)。

// Cesium viewer set up
var viewer = new Cesium.Viewer("cesiumContainer",{
  
});

// tilset setup
var tileset = new Cesium.Cesium3DTileset({
  url: 'http://localhost:8080/20210125_5RIAOM_CESIUM 3D Tlies_HQ/tileset.json'
});

// Add the tileset to the 3D scene
viewer.scene.primitives.add(tileset);

// Zoom on Tileset
tileset.readyPromise.then(function (tileset) {
  viewer.scene.camera.setView({
    // Final position has to take into account the whole tileset
    destination: tileset.root.boundingVolume.rectangle,});
});

SS_CesiumJS

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)