CesiumGS / cesium

An open-source JavaScript library for world-class 3D globes and maps :earth_americas:
https://cesium.com/cesiumjs/
Apache License 2.0
13.03k stars 3.51k forks source link

3dtiles loaded then exit #7162

Closed veolata closed 5 years ago

veolata commented 6 years ago

Why loading my 3dtile, still get an error. It is loaded, but it seems reverse and after loading, it disappear. Tile is here: http://120.26.46.56/pro.zip

and test code is here

<!DOCTYPE html>
<html lang="en">
<head>

    <meta charset="utf-8">

    <meta http-equiv="X-UA-Compatible" content="IE=edge">

    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
    <title>加载3Dtiles数据</title>
    <script src="../../../../Build/Cesium/Cesium.js"></script>

    <script type="text/javascript">
        // require.config({ baseUrl : '../Source', waitSeconds : 60 });
    </script>

    <style>
        @import url(../templates/bucket.css);
        #toolbar {
            background: rgba(42, 42, 42, 0.8);
            padding: 4px;
            border-radius: 4px;
        }
        #toolbar input {
            vertical-align: middle;
            padding-top: 2px;
            padding-bottom: 2px;
        }
    </style>
</head>
<body>
<div id="cesiumContainer"></div>

<script>
    var viewer = new Cesium.Viewer('cesiumContainer',{
        animation:false,       //是否显示动画控件
        homeButton:true,       //是否显示home键
        geocoder:true,         //是否显示地名查找控件        如果设置为true,则无法查询
        baseLayerPicker:false, //是否显示图层选择控件
        timeline:false,        //是否显示时间线控件
        fullscreenButton:true, //是否全屏显示
        scene3DOnly:true,     //如果设置为true,则所有几何图形以3D模式绘制以节约GPU资源
        infoBox:true,         //是否显示点击要素之后显示的信息
        sceneModePicker:false,  //是否显示投影方式控件  三维/二维
        navigationInstructionsInitiallyVisible:false,
        navigationHelpButton:false,     //是否显示帮助信息控件
        selectionIndicator:false,        //是否显示指示器组件
        //加载谷歌卫星影像
        //imageryProvider : new Cesium.UrlTemplateImageryProvider({url:"http://mt1.google.cn/vt/lyrs=s&hl=zh-CN&x={x}&y={y}&z={z}&s=Gali"}),
        //terrainProvider : new Cesium.CesiumTerrainProvider({url: "https://www.supermapol.com/iserver/services/3D-stk_terrain/rest/realspace/datas/info/data/path/"})
    });
    viewer._cesiumWidget._creditContainer.style.display = "none";  //   去除版权信息

    var tileset = new Cesium.Cesium3DTileset({
        url: '../../SampleData/Scene/Production_2.json'
    });

    tileset.readyPromise.then(function(tileset) {
        viewer.scene.primitives.add(tileset);
        viewer.zoomTo(tileset);

        //viewer.zoomTo(tileset, new Cesium.HeadingPitchRange(0.0, -0.5, tileset.boundingSphere.radius * 2.0));
    }).otherwise(function(error) {
        console.log(error);
    });

</script>
</body>
</html>
lilleyse commented 6 years ago

Thanks for the download link, however the download is slow (about 10Kbps) and often gets paused. Would you be able to host the tileset on a faster site?

In the meantime could you upload Production_2.json directly to github and maybe include a screenshot or gif of the problem? Also what version of Cesium are you using?

veolata commented 6 years ago

Thanks for the download link, however the download is slow (about 10Kbps) and often gets paused. Would you be able to host the tileset on a faster site?

In the meantime could you upload Production_2.json directly to github and maybe include a screenshot or gif of the problem? Also what version of Cesium are you using?

The newest cesium -->1.5 I built another but much smaller tileset(30M) to reproduce the scenario.

Download link. http://120.26.46.56:9999/s.zip Many thanks~

hpinkos commented 5 years ago

closing due to inactivity. @veolata if you are still having issues feel free to re-open this issue