cesium 加载倾斜摄影模型(这里有一坑)

Posted dongzhiwu

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了cesium 加载倾斜摄影模型(这里有一坑)相关的知识,希望对你有一定的参考价值。

  代码如下:

 1 // Construct the default list of terrain sources.
 2 var terrainModels = Cesium.createDefaultTerrainProviderViewModels();
 3 
 4 // Construct the viewer with just what we need for this base application
 5 var viewer = new Cesium.Viewer(‘cesiumContainer‘, {
 6     timeline:false,
 7     animation:false,
 8     vrButton:true,
 9     sceneModePicker:false,
10     infoBox:true,
11     scene3DOnly:true,
12     terrainProviderViewModels: terrainModels,
13     selectedTerrainProviderViewModel: terrainModels[1]  // Select STK high-res terrain
14 });
15 
16 // No depth testing against the terrain to avoid z-fighting
17 viewer.scene.globe.depthTestAgainstTerrain = false;
18 
19 var tileset = viewer.scene.primitives.add(new Cesium.Cesium3DTileset({
20     url: ‘../static/resource/jiangShanModel/Production_3.json‘,
21     maximumScreenSpaceError: 2,
22     maximumNumberOfLoadedTiles: 1000
23 }));

坑来了!!!!

一定要注意使用的cesium的版本,因为我加载了地形之后,倾斜摄影模型一直与地形有相交的部分,最后发现是引用的cesium.js的版本问题》》

以上是关于cesium 加载倾斜摄影模型(这里有一坑)的主要内容,如果未能解决你的问题,请参考以下文章

Cesiumjs可以加载倾斜摄影的OSGB数据吗

supermap cesium 加载倾斜摄影

vue cesium 加载倾斜摄影数据并在上面添加自定义标注

倾斜摄影数据转cesium 3D tiles工具介绍

基于Cesium的实景三维模型动态更新-以3Dtiles为例

基于Cesium的实景三维模型动态更新-以3Dtiles为例