国产久_亚欧精品一区_久久亚洲美女_99精品在线观看_日韩成人三级_久久精品久久久久

顯示源代碼
截屏功能
 開發文檔
            <!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://bigemap.com:9000/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://bigemap.com:9000';
        var viewer = new bmgl.Viewer('container', {
            mapId: 'bigemap.zhongkexingtu',
        });
        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), // 設置位置
                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>                                                                                                                    
主站蜘蛛池模板: 四虎视频国产精品免费 | 嫩草亚洲| 干干天天| 亚洲欧美综合在线观看 | 二区在线播放 | 日本wwwxx| 国产六区| 亚洲一区二区三区视频在线 | 91视频首页 | 国产欧美精品区一区二区三区 | 天天操夜夜操视频 | 午夜精品视频 | 特及毛片 | 91在线视频 | 特一级黄色毛片 | 国产成人精品123区免费视频 | 特级毛片免费 | 久草免费在线色站 | 91久久国产视频 | www.久艹| 色噜噜影院 | 欧美 日韩 国产 成人 在线 91 | 精品一区二区三区中文字幕老牛 | 亚洲欧美成人 | 欧美一级电影在线播放 | 国产精品一区二区精品 | 国产一区二区网站 | 五月综合久久 | 麻豆传媒剧情在线 | 狠狠撸影视 | 毛片的网站| 日韩国产成人 | 97日日夜夜 | 欧美久久久久久久久 | 国产三级自拍 | 在线视频亚洲 | 久热中文字幕在线 | 免费在线观看黄网站 | 中文字幕一区二区三区电影 | 国产一级片精品 | 国产精品91久久久久 |