<!DOCTYPE html> <html> <head> <meta charset='UTF-8'/> <meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no'/> <link href='http://bigemap.com:9000/bigemap-gl.js/v1.1.0/Widgets/widgets.css' 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} </style> <title>part_test</title> </head> <body> <div id='container'></div> <script> bmgl.Config.HTTP_URL = 'http://bigemap.com:9000'; var viewer = new bmgl.Viewer('container', {mapId: 'bigemap.zhongkexingtu'}); viewer.dataSources.add(bmgl.GeoJsonDataSource.load('/bmgl/data/marker.geojson', { stroke: bmgl.Color.HOTPINK, fill: bmgl.Color.PINK, strokeWidth: 3, markerSymbol:'?' })); //不启用地形遮挡 viewer.scene.globe.depthTestAgainstTerrain=false; viewer.camera.setView({ destination:new bmgl.Cartesian3(-1190166.6556145013,5434186.559819225,3208092.777030519), orientation:{ "heading":1.2285761432536981,"roll":6.283182042921284,"pitch":-0.28566891149703455 } }); </script> </body> </html>
源码