<!DOCTYPE html> <html> <head> <meta charset='UTF-8'/> <meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no'/> <link href='http://www.bigemap.com:9000/bigemap-gl.js/v1.1.0/Widgets/widgets.css' rel='stylesheet'/> <script src='http://www.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%; } </style> <title>Google Map Satellite (English)</title> </head> <body> <div id='container'></div> <script> bmgl.Config.HTTP_URL = 'http://www.bigemap.com:9000'; var viewer = new bmgl.Viewer('container', {mapId: 'bigemap.zhongkexingtu', requestRenderMode: false}); //河道关键点数组 var River1Point = [ 119.093492, 31.16358791, 119.0942431, 31.16246787, 119.0948439, 31.16243115, 119.0953589, 31.16175177, 119.0959597, 31.16134782, 119.0979123, 31.15975034, 119.0977836, 31.15945655, 119.0983629, 31.15896078, 119.1008306, 31.1576387, 119.1050577, 31.15664713, 119.1084266, 31.15554537, 119.109242, 31.1549394, 119.1110015, 31.15376417, 119.1129327, 31.15141366, 119.1167736, 31.15001802, 119.1190481, 31.14886109, 119.1191983, 31.14829181, 119.119134, 31.14777761, 119.1187477, 31.1473736, 119.1183186, 31.14722668, 119.117589, 31.14682266, 119.1171813, 31.14625337, 119.1171813, 31.14575752, 119.1172886, 31.14507803, 119.1178894, 31.14410469, 119.1185117, 31.14346191, 119.1190481, 31.14305788, 119.1197133, 31.14272731, 119.1204858, 31.14236, 119.1216445, 31.14136827, 119.1221809, 31.14050509, 119.1234684, 31.139697, 119.1244125, 31.13861341, 119.1246486, 31.13789713, 119.1243911, 31.13646456, 119.1248632, 31.13521563, 119.1257644, 31.13426056, 119.1269016, 31.13302997, 119.1281891, 31.13150549, 119.1291118, 31.13086263, 119.1310644, 31.13062385, 119.134047, 31.13071569, 119.1360855, 31.13040344, 119.1376519, 31.1296871, 119.1395831, 31.1287136, 119.1417503, 31.12753805, 119.1420507, 31.12746457, 119.1425872, 31.12810746, 119.140892, 31.12873197, 119.1376734, 31.1303667, 119.1338325, 31.13146875, 119.1303992, 31.13124834, 119.1287899, 31.13181773, 119.1276097, 31.13330548, 119.1256571, 31.13541766, 119.1252279, 31.13644619, 119.1252494, 31.13797059, 119.1247773, 31.13938478, 119.1222453, 31.14164375, 119.1211724, 31.14270894, 119.1194344, 31.14359047, 119.1182113, 31.14542696, 119.1179109, 31.14617991, 119.1184044, 31.14665738, 119.1198635, 31.1476307, 119.1199493, 31.14867745, 119.1196704, 31.14917328, 119.1184902, 31.14985275, 119.1161084, 31.15115657, 119.1151214, 31.15124839, 119.1139627, 31.15170748, 119.1126323, 31.15306637, 119.1104865, 31.15536174, 119.1089416, 31.15627988, 119.1055727, 31.15745508, 119.103663, 31.15767542, 119.1014957, 31.15844664, 119.1002727, 31.15908931, 119.0993071, 31.16000741, 119.0977621, 31.16125601, 119.0971398, 31.1617885, 119.0962172, 31.16257804, 119.0940929, 31.16452433, 119.0940499, 31.16454269 ] //河道1多边形 var polygon1 = new bmgl.PolygonGeometry({ polygonHierarchy: new bmgl.PolygonHierarchy(bmgl.Cartesian3.fromDegreesArray(River1Point)), extrudedHeight: 0, height: 0, vertexFormat: bmgl.EllipsoidSurfaceAppearance.VERTEX_FORMAT }); var River1 = new bmgl.Primitive({ geometryInstances: new bmgl.GeometryInstance({ geometry: polygon1 }), appearance: new bmgl.EllipsoidSurfaceAppearance({ aboveGround: true }), show: true }); var River1_Material = new bmgl.Material({ fabric: { type: 'Water', uniforms: { normalMap: '/bmgl/images/water.jpg', frequency: 100.0, animationSpeed: 0.01, amplitude: 10.0 } } }); var scene = viewer.scene; River1.appearance.material = River1_Material; scene.primitives.add(River1); //添加到场景 viewer.camera.setView({ destination: bmgl.Cartesian3.fromDegrees(119.093492, 31.16358791, 3000) }); </script> </body> </html>
源码