基于SuperMap iClient3D for WebGL开发,球不显示

0 投票
效果如下:
代码如下:
<!DOCTYPE html>
<html lang="cn-zh">
<head>
<meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
  <title>国图AR地图在线展示系统</title>
  <link href="static/Cesium/Widgets/widgets.css" rel="stylesheet">
  <link href="static/css/pretty.css" rel="stylesheet">
  <script src="static/js/jquery.min.js"></script>
  <script src="static/js/config.js"></script>
  <script src="static/Cesium/Cesium.js"></script>
</head>
<body style="height: 100%">
<style>
    * {
        touch-action: pan-y;
    }
</style>
<div id="cesiumContainer"></div>

<script>
    function onload(Cesium) {
        var viewer = new Cesium.Viewer('cesiumContainer');
        }
  </script>
</body>
</html>

12月 9, 2020 分类:  192次浏览 | 用户: wmq_whu 初出茅庐 (56 分)

1个回答

0 投票

您好,您好像没有调用onload这个方法,试下在script里加上这段代码:

if (typeof Cesium !== 'undefined') {
    window.startupCalled = true;
    onload(Cesium);
}

12月 10, 2020 用户: jjz 名扬四海 (4,415 分)
...