• 超图三维服务的发布


    发布三维地图服务之后,前端调用:

    <!DOCTYPE html>
    <html>
    <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>Hello World!</title>
      <link href="../Build/Cesium/Widgets/widgets.css" rel="stylesheet">
      <script src="../Build/Cesium/Cesium.js"></script>
      <script src="./js/require.min.js"></script>
      <style>
        html, body, #cesiumContainer {
          width: 100%; height: 100%; margin: 0; padding: 0; overflow: hidden;
        }
      </style>
    </head>
    <body>
    <div id="cesiumContainer">
    </div>
    <script>
         Cesium.Ion.defaultAccessToken = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJiYTZjMjY5Ni03MTc0LTQ5MGYtOGJiYy02YzkzNjRiYmMwYWEiLCJpZCI6NDM0NTQsImlhdCI6MTYxMjY2MTk0Mn0.bYoo6o2FX0GnvbEUMUR8wHFT-MX10_ELQseMKcr2Ld0'
    
        let viewer = new Cesium.Viewer('cesiumContainer',{
        });
        let scene = viewer.scene;
        require(['./js/S3MTiles/S3MTilesLayer'], function(S3MTilesLayer) {
            let layer = new S3MTilesLayer({
                context : scene._context,
                url: './data/pipe3D/PipeNetWork@Pipe3D/PipeNetWork@Pipe3D.scp'
            });
    
            scene.primitives.add(layer);
    
            layer.readyPromise.then(function() {
                scene.camera.setView({
                    destination : new Cesium.Cartesian3(-2182469.166141913, 4386579.0994979935, 4069925.783807108),
                    orientation : {
                        heading : 5.213460518239332,
                        pitch : -0.5150671720144846
                    }
                });
            }).otherwise(function(error) {
                console.log(error);
            });
        })
    
    </script>
    </body>
    </html>
  • 相关阅读:
    Linux 三剑客之SED
    搭建Docker环境
    Docker rabbitmq
    Docker Redis 集群
    Docker Mysql
    lerna 大前端项目代码重用解决方案
    将create-react-app从javascript迁移到typescript
    使用 React hooks 优雅解决 mp3 的播放 和 暂停
    React 代码 Import Svg as ReactComponent 失败
    vue3 自定义 hooks 优雅处理异步调用 ajax
  • 原文地址:https://www.cnblogs.com/2008nmj/p/14876100.html
Copyright © 2020-2023  润新知