在线免费看污_亚洲视频在线免费观看_91精品国产电影_久久国产亚洲_久久四虎影院_亚洲欧美a_国产精品一区二区三

顯示源代碼
鏡頭運動
 開發文檔
            <!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <script src="http://bigemap.com/offline_data/newjunbiao/vue.js"></script>
        <link
            href="http://ua.bigemap.com:30081/bmsdk/bigemap-gl.js/v1.1.0/Widgets/widgets.css"
            rel="stylesheet"
        />
        <script src="http://ua.bigemap.com:30081/bmsdk/bigemap-gl.js/v1.1.0/bigemap-gl.js"></script>
        <!-- elementui -->
        <script src="http://bigemap.com/offline_data/newjunbiao/elementui.js"></script>
        <link
            rel="stylesheet"
            href="http://bigemap.com/offline_data/newjunbiao/elementui.css"
        />
        <title>相機鏡頭按照步驟運動</title>
        <style>
            * {
                margin: 0;
                padding: 0;
            }
            html,
            body {
                width: 100%;
                height: 100%;
            }
            #app {
                width: 100%;
                height: 100%;
            }
            #baseMap {
                width: 100%;
                height: 100%;
            }
            .tools {
                position: absolute;
                z-index: 9;
                top: 40px;
                right: 60px;
                width: 200px;
                height: 40px;
                display: flex;
                align-items: center;
            }
        </style>
    </head>
    <body>
        <div id="app">
            <div id="baseMap"></div>
        </div>
        <script>
            window.viewer = null;
            window.onload = () => {
                new Vue({
                    el: "#app",
                    data() {
                        return {};
                    },
                    mounted() {
                        this.initMap();
                    },
                    methods: {
                        //初始化地圖
                        initMap() {
                            bmgl.Config.HTTP_URL =
                                "http://ua.bigemap.com:30081/bmsdk/";
                            viewer = new bmgl.Viewer("baseMap", {
                                mapId: "bigemap.dc-satellite",
                                infoBox: false,
                                selectionIndicator: false,
                                requestRenderMode: false,
                            });
                            viewer.camera.setView({
                                destination: bmgl.Cartesian3.fromDegrees(
                                    102,
                                    30,
                                    10000
                                ),
                            });
                            setTimeout(() => {
                                this.stepFly(viewer, {
                                    // 目的地經度
                                    lon: 104,
                                    //  目的地緯度
                                    lat: 30,
                                    // 目的地的鏡頭高度
                                    height: 23000,
                                    // 目的地的鏡頭旋轉角度
                                    orientation: {
                                        heading: bmgl.Math.toRadians(90),
                                        roll: 0,
                                        pitch: 0,
                                    },
                                });
                            },4000);
                        },
                        RetuendefaultValue(a, b) {
                            if (a !== undefined && a !== null) {
                                return a;
                            }
                            return b;
                        },
                        //按步驟調整飛行位置
                        stepFly(viewer, options) {
                            const { camera } = viewer;
                            const step1 = this.RetuendefaultValue(
                                options.firstDuration,
                                3
                            );
                            const step2 = this.RetuendefaultValue(
                                options.secondDuration,
                                3
                            );
                            const step3 = this.RetuendefaultValue(
                                options.thirdDuration,
                                3
                            );

                            const cartographic = options.destination;
                            // 第一步調整鏡頭位置
                            const cur_height =
                                viewer.camera._positionCartographic.height;
                            const firstStep = bmgl.Cartesian3.fromDegrees(
                                options.lon,
                                options.lat,
                                cur_height
                            );
                            // 第二步調整鏡頭高度
                            const secondStep = bmgl.Cartesian3.fromDegrees(
                                options.lon,
                                options.lat,
                                options.height
                            );
                            return new Promise((resolve) => {
                                camera.flyTo({
                                    destination: firstStep,
                                    duration: step1,
                                    complete() {
                                        camera.flyTo({
                                            destination: secondStep,
                                            duration: step2,
                                            complete() {
                                                camera.flyTo({
                                                    destination: secondStep,
                                                    orientation:
                                                        options.orientation,
                                                    duration: step3,
                                                    complete() {
                                                        resolve();
                                                    },
                                                });
                                            },
                                        });
                                    },
                                });
                            });
                        },
                    },
                    beforeDestroy() {
                        viewer.destroy();
                        viewer = null;
                    },
                });
            };
        </script>
    </body>
</html>
        
主站蜘蛛池模板: 欧美色性视频 | 日韩中文字幕视频 | 免费国产影视观看网站入口 | 国产女主播福利 | 99这里有精品视频 | 日本三级日本三级日本三级极 | 欧美69视频 | 欧美黄色一级网站 | 久久午夜剧场 | 免费特级片 | 99视频精品全部免费观看 | 免费一级做a爰片久久毛片潮 | 日本高清va不卡视频在线观看 | 手机看片日韩国产一区二区 | 天天干天天干天天天天天天爽 | 青青久久久国产线免观 | 国产九九热视频 | 涩涩99 | 久草最新视频 | 亚洲国产日韩欧美高清片a 亚洲国产日韩在线观看 | 欧美xxxxb| 久久精品国产亚洲aa | 在线免费不卡视频 | 国产精品视频人人做人人爱 | 欧美国产人妖另类色视频 | 久久精品第一页 | 日韩一区二区免费视频 | 69堂在线观看 | 国产日韩欧美视频 | 国产成人av在线 | 亚洲精彩视频在线观看 | 国产成人综合在线 | 欧美激情视频二区三区 | 天天干天天玩天天操 | 97热久久免费频精品99国产成人 | 日韩一区二区三区视频在线观看 | 青青操青青 | 欧美成人性色xxxx视频 | 国产一区二区精品久久91 | 日本黄色片免费看 | 国内精品久久久久久久久久影视 |