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

顯示源代碼
截屏功能
 開(kāi)發(fā)文檔
            <!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>
    <style>
        body {
            margin: 0;
            padding: 0;
        }

        #container {
            position: absolute;
            top: 0;
            bottom: 0;
            width: 100%;
        }

        .bmgl-widget-credits {
            display: none
        }

        .jietu {
            position: absolute;
            top: 30px;
            right: 100px;
        }
    </style>
    <title>part_test</title>
</head>

<body>
    <div id='container'></div>
    <button class='jietu' onclick="jietu()">截圖</button>
    <script>
        bmgl.Config.HTTP_URL = 'http://ua.bigemap.com:30081/bmsdk/';
        var viewer = new bmgl.Viewer('container', {
            mapId: 'bigemap.dc-satellite',
        });
        viewer.BMWidget.screenSpaceEventHandler.removeInputAction(bmgl.ScreenSpaceEventType.LEFT_CLICK);
       
        var promise = bmgl.GeoJsonDataSource.load('/Public/offline/chad/510000.geojson');
        promise.then(function (dataSource) {
            viewer.dataSources.add(dataSource);
            //Get the array of entities
            var entities = dataSource.entities.values;
            var colorHash = {};
            for (var i = 0; i < entities.length; i++) {
                //For each entity, create a random color based on the state name.
                //Some states have multiple entities, so we store the color in a
                //hash so that we use the same color for the entire state.
                var entity = entities[i];
                var name = entity.name;
                var color = colorHash[name];
                if (!color) {
                    color = bmgl.Color.fromRandom({
                        alpha: 1,
                    });
                    colorHash[name] = color;
                }
                //Set the polygon material to our random color.
                entity.polygon.material = color;
                //Remove the outlines.
                entity.polygon.outline = false;
                //Extrude the polygon based on the state's population.  Each entity
                //stores the properties for the GeoJSON feature it was created from
                //Since the population is a huge number, we divide by 50.
                entity.polygon.extrudedHeight = Math.floor(Math.random() * 600000 + 10000);
            }
            viewer.camera.flyTo({
                destination: bmgl.Cartesian3.fromDegrees(98.435314, 19.960521, 1500000.0), // 設(shè)置位置
                orientation: {
                  heading: bmgl.Math.toRadians(20.0), // 方向
                  pitch: bmgl.Math.toRadians(-50.0),// 傾斜角度
                  roll: bmgl.Math.toRadians(-20.0)
                }
            });
        }).otherwise(function (error) {
            //Display any errrors encountered while loading.
            window.alert(error);
        });

        function jietu() {
            viewer.scene.render()

            var dataUrl = viewer.scene.canvas.toDataURL("image/png");
            var url = dataUrl;
            var a = document.createElement('a');
            var event = new MouseEvent('click');
            a.download = 'map.png';
            a.href = url;
            a.dispatchEvent(event);
        }
    </script>
</body>

</html>                                                                                                                    
主站蜘蛛池模板: 久久久久久国产精品mv | 九九九在线视频 | 青青偷拍视频 | 两个人看的www | 亚洲第一久久 | 黄色午夜 | 九九久久久| 精品在线99 | 日本二区免费一片黄2019 | 全免费a级毛片免费毛视频 全免费观看a级毛片 | 99久久国产综合精麻豆 | 99国产精品免费观看视频 | 日本高清网址 | 国产精品福利午夜一级毛片 | 久久99精品久久久久久久不卡 | 中文字幕在线永久在线视频2020 | 青青青激情视频在线最新 | 久久免费观看国产99精品 | 秋霞手机入口二日韩区 | 国产精品久久影院 | 亚洲va国产日韩欧美精品色婷婷 | 国产欧美亚洲精品第一页久久肉 | 日本视频一区在线观看免费 | 伦理激情小说 | 亚洲春黄在线观看 | 亚洲最新永久观看在线 | 欧美线人一区二区三区 | 人人人人澡| 欧美一区二区三区久久久 | 国产日韩视频一区 | 青草视频免费观看在线观看 | 玖玖在线国产精品 | 久久成年人 | 一区毛片 | 国产成人一区二区小说 | 免费a级黄色片 | 美女爱爱网 | 狠狠操精品视频 | 久久久久亚洲视频 | 免费日韩视频 | 国产成人18|