顯示源代碼
                截屏功能
                 開發(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>                                                                                                                    
                主站蜘蛛池模板: 国产精品亚洲一区二区三区| 两个人看的视频高清在线www| 最近最新的免费中文字幕| 国产精品99久久久久久宅男| 久久亚洲日韩精品一区二区三区| 美女黄18以下禁止观看| 天天干天天综合| 亚洲欧洲日韩在线电影| 欧美成人18性| 扒下老师的黑色丝袜桶她| 偷看农村妇女牲交| 2020亚洲欧美日韩在线观看| 日韩精品国产一区| 午夜精品在线免费观看| 免费黄色福利视频| 在线观看麻豆精品国产不卡| 中文字幕第3页| 男人扒开添女人下部免费视频| 国产凌凌漆国语| my1136蜜芽入口永不失联版| 日本最新免费二区三区| 亚洲国产精品xo在线观看| 茄子视频国产在线观看| 国产精品亚洲二区在线| a级毛片高清免费视频就| 领导边摸边吃奶边做爽在线观看| 男女超爽视频免费播放| 国产精品国产高清国产av| 一个人看的视频在线| 日本工口里番h彩色无遮挡全彩| 亚洲国产精品综合久久网络| 男性gay黄免费网站| 四虎永久精品免费观看| 99re热久久| 日韩一区二区三区免费视频| 免费在线观看污视频网站| 蜜桃成熟时2005| 在线a亚洲视频播放在线观看| 久久综合给合综合久久| 毛片免费观看视频| 国产女同疯狂摩擦系列1|