You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
pingAnQiYeWeb/public/static/map.html

52 lines
1.7 KiB

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
#container {
width: 100vw;
height: 100vh;
/* border: 0.1px solid #495e70; */
}
/* 去除百度地图logo */
.anchorBL {
display: none
}
</style>
<!-- <script src="https://unpkg.com/mapv-three@1.0.10/dist/mapvthree.umd.js"></script> -->
<script src="https://api.map.baidu.com/api?v=1.0&type=webgl&ak=CSfWwqFqSVkQaqcAAMxKyXg6Moe9UUqA"></script>
</head>
<body>
<div id="container"></div>
<script>
// import { Engine } from 'mapv-three';
// 创建地图实例
var map = new BMapGL.Map("container"); // 创建地图实例
var point = new BMapGL.Point(121.619992, 30.025703); // 创建点坐标
map.centerAndZoom(point, 14); // 初始化地图,设置中心点坐标和地图级别
map.enableScrollWheelZoom();
// 初始化 mapvthree 引擎(第一个参数为地图实例或DOM)
// const engine = new Engine(map, {
// rendering: {
// enableAnimationLoop: true,
// }
// });
// engine.map.setCenter(center);
// engine.map.setPitch(60);
map.setMapType(BMAP_SATELLITE_MAP);
// map.setHeading(64.5);
// map.setTilt(73);
// 禁止地图旋转和倾斜可以通过配置项进行设置
var map = new BMapGL.Map("allmap", {
enableRotate: false,
enableTilt: false
});
</script>
</body>
</html>