顯示源代碼
                鏡頭運動
                 開發文檔
                            <!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>
                        
                主站蜘蛛池模板: 91免费国产精品| 久久综合九色综合欧美就去吻| 试看91福利区体验区120秒| 在线免费看黄网站| 中文字幕视频在线播放| 四虎永久在线日韩精品观看| 成人亚洲欧美日韩中文字幕| 亚洲va欧美va天堂v国产综合 | 亚洲精品成a人在线观看| 色综合小说久久综合图片| 国产精品无码一区二区三区不卡| 一本一本久久a久久精品综合| 日本电影中文字幕| 又爽又黄又无遮挡的视频在线观看 | 欧美老妇与禽交| 午夜精品一区二区三区免费视频| 黄色三级三级免费看| 国产精自产拍久久久久久蜜| xxxxx免费| 无码精品国产va在线观看dvd| 亚洲а∨天堂久久精品| 波多野结衣中文字幕在线视频| 又大又紧又硬又湿a视频| 香港三日本8A三级少妇三级99| 国产精品夜间视频香蕉| BT天堂新版中文在线| 成人18免费网站在线观看| 久久亚洲AV无码精品色午夜麻豆| 欧美三级中文字幕在线观看| 亚洲精品福利网站| 精品国产日韩一区三区| 国产一级片播放| 99久久亚洲精品无码毛片| 成人羞羞视频国产| 久久精品国产99国产精品澳门 | 中文字幕亚洲专区| 日韩aⅴ人妻无码一区二区| 亚洲乱码一二三四区乱码| 欧美裸体xxxx极品少妇| 免费人成网站在线观看欧美| 老子影院午夜伦手机不四虎|