亚洲动漫在线观看-亚洲动漫第一页-亚洲丁香婷婷-亚洲丶国产丶欧美一区二区三区-亚洲第一综合网站-亚洲第一永久色

顯示源代碼
3d行政區突出展示
 開發文檔
            <!DOCTYPE html>

<html>
    <head>
        <meta charset="UTF-8" />
        <meta
            name="viewport"
            content="initial-scale=1,maximum-scale=1,user-scalable=no"
        />
        <link  rel='stylesheet'/>
        <script src='http://ua.bigemap.com:30081/bmsdk/bigemap-gl.js/v1.1.0/bigemap-gl.js'></script>
        <!-- 波動特效 -->
        <script src="http://www.bjxdny.cn/Public/js/3d/circleWave.js"></script>
        <!-- 墻體特效 -->
        <script src="/bmgl/border/wall.js"></script>
        <style>
            body {
                margin: 0;
                padding: 0;
            }
            #container {
                position: absolute;
                top: 0;
                bottom: 0;
                width: 100%;
                /* background: url("/bmgl/borderbg.png") no-repeat; */
                /* background-size: cover; */
            }
        </style>
        <title>遂寧市衛圖</title>
    </head>
    <body>
        <div id="container"></div>

        <script>
            let arr = [
                [105.63423157, 30.51347018, 0],
                [105.4083252, 30.83149788, 0],
                [105.26550293, 30.5220473, 0],
            ];
            bmgl.Config.HTTP_URL = 'http://ua.bigemap.com:30081/bmsdk/';

            window.viewer = new bmgl.Viewer("container", {
                mapId: "bigemap.brcmean6",
                // terrainId: "bigemap.3vom3sxx",
                orderIndependentTranslucency: false,
                contextOptions: {
                    webgl: {
                        alpha: true,
                    },
                },
            });
            viewer.camera.setView({
                destination: bmgl.Rectangle.fromDegrees(
                    105.05606079101562,
                    30.17629623413086,
                    105.99750518798828,
                    31.163055419921875
                ),
            });
            if (bmgl.FeatureDetection.supportsImageRenderingPixelated()) {
                //判斷是否支持圖像渲染像素化處理
                viewer.resolutionScale = window.devicePixelRatio;
            }
            viewer.imageryLayers.addImageryProvider(
                new bmgl.SingleTileImageryProvider({
                    url: "/bmgl/border/calib.png",
                    rectangle: new bmgl.Rectangle.fromDegrees(
                        104.63653564,
                        30.05720849,
                        106.25427246,
                        31.29498105
                    ),
                })
            );
            viewer.imageryLayers.addImageryProvider(
                new bmgl.SingleTileImageryProvider({
                    url: "/bmgl/border/calib-value.png",
                    rectangle: new bmgl.Rectangle.fromDegrees(
                        104.66125488,
                        30.08573123,
                        106.21994019,
                        31.26681325
                    ),
                })
            );
            viewer.imageryLayers.addImageryProvider(
                new bmgl.SingleTileImageryProvider({
                    url: "/bmgl/border/calib-dir.png",
                    rectangle: new bmgl.Rectangle.fromDegrees(
                        104.66125488,
                        30.08573123,
                        106.21994019,
                        31.26681325
                    ),
                })
            );
            window.viewer = viewer;
            viewer.scene.fxaa = true;
            viewer.scene.postProcessStages.fxaa.enabled = true;
            viewer.scene.skyBox.show = false; //隱藏天空盒子
            // viewer.scene.backgroundColor = new bmgl.Color(0.0, 0.0, 0.0, 0.0); //隱藏黑色背景
            viewer.scene.backgroundColor = new bmgl.Color.fromCssColorString(
                "#363635"
            ); //隱藏黑色背景
            viewer.scene.globe.baseColor = new bmgl.Color.fromCssColorString(
                "#363635"
            ); //替換球體默認藍色
            viewer.scene.globe.enableLighting = false; //隱藏太陽
            viewer.shadows = false;
            viewer.scene.sun.show = false; //或者viewer.scene.sun.destroy();
            viewer.scene.moon.show = false; //隱藏月亮
            viewer.scene.skyAtmosphere.show = false; //大氣圈
            viewer.scene.fog.enable = false; //霧
            // 加載邊界墻體
            function loadWall() {
                var promise = bmgl.KmlDataSource.load("/bmgl/border/snwt.kml");
                promise
                    .then(function (dataSource) {
                        // viewer.dataSources.add(dataSource);
                        var entities = dataSource.entities.values;
                        var colorHash = {};
                        let wallArr = [];
                        let maxlength = 0;
                        for (let i = 0; i < entities.length; i++) {
                            var entity = entities[i];
                            if (entity.polygon) {
                                //  console.log(entity.polygon.hierarchy.getValue().positions);
                                let aa =
                                    entity.polygon.hierarchy.getValue()
                                        .positions;
                                if (i == 0 && wallArr.length == 0) {
                                    wallArr.push(...aa);
                                    maxlength = wallArr.length;
                                } else {
                                    if (aa.length >= maxlength) {
                                        wallArr = [];
                                        wallArr.push(...aa);
                                        maxlength = aa.length;
                                    }
                                }
                            }
                        }
                        viewer.entities.add({
                            wall: {
                                positions: wallArr,
                                minimumHeights: new Array(wallArr.length).fill(
                                    0
                                ),
                                maximumHeights: new Array(wallArr.length).fill(
                                    3000
                                ),
                                // material: bmgl.Color.fromCssColorString("#2a492c").withAlpha(0.9),
                                material: new bmgl.WallDiffuseMaterialProperty({
                                    color: bmgl.Color.fromCssColorString(
                                        "#2a492c"
                                    ).withAlpha(0.9),
                                }),
                            },
                        });
                        viewer.flyTo(viewer.entities);
                    })
                    .otherwise(function (error) {
                        //Display any errrors encountered while loading.
                        window.alert(error);
                    });
            }

            loadWall();

            //加載點位特效
            function loadWaveandEffect(viewer, arr) {
                arr.forEach((position, index) => {
                    let circleWave = new CircleWave(
                        viewer,
                        `cirCleWave${index}`
                    );
                    circleWave.add(position, "#1FA8E3", 5000, 3000); //經緯度,顏色,半徑,時間
                    viewer.entities.add({
                        position: bmgl.Cartesian3.fromDegrees(
                            position[0],
                            position[1],
                            400
                        ),
                        billboard: {
                            image: "/bmgl/border/park.png",
                            scale: 0.2,
                            pixelOffset: new bmgl.Cartesian2(2, -12),
                        },
                    });
                });
            }

            loadWaveandEffect(viewer, arr);
        </script>
    </body>
</html>
        
主站蜘蛛池模板: 热久久免费 | 精品日韩视频 | 成人一区二区丝袜美腿 | 韩国www | 免费国产影视观看网站入口 | 精品国产在线观看 | 国产精品第一区揄拍 | 亚欧洲乱码视频一二三区 | 短篇艳妇系列 | 亚洲第一福利网 | 5g影院天天影院天天爽影院网站 | 日本性漫画 | 美国女孩毛片 | 调教女高中生第3部分 | 亚洲一区二区三区福利在线 | 把女的下面扒开添视频 | 国产成人精品男人的天堂538 | 亚洲AV久久久噜噜噜久久 | 无码射肉在线播放视频 | 欧美二区视频 | 男人香蕉好大好爽视频 | 九九九九九九 | 青草香蕉精品视频在线观看 | 九九国产在线视频 | 欧美日韩国产另类一区二区三区 | 国产良心大作白丝精厕 | 44444色视频在线观看 | 亚洲免费网站在线观看 | 公妇乱淫在线播放免费观看 | 欧美兽皇另类 | 日本漫画无翼乌 | jizz女16处 | 亚洲mm色国产网站 | 星空无限传媒xk8129 | 肉文高h调教 | 四虎院影永久在线观看 | 香蕉国产人午夜视频在线观看 | 色老板在线免费观看 | 国产日韩欧美色视频色在线观看 | 婷婷丁香色综合狠狠色 | 天天色视频 |