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.
|
|
|
<!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://api.map.baidu.com/api?v=1.0&type=webgl&ak=CSfWwqFqSVkQaqcAAMxKyXg6Moe9UUqA"></script>
|
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
|
|
|
<div id="container"></div>
|
|
|
|
<script>
|
|
|
|
// 创建地图实例
|
|
|
|
var map = new BMapGL.Map("container"); // 创建地图实例
|
|
|
|
var point = new BMapGL.Point(121.619401, 30.046348); // 创建点坐标
|
|
|
|
map.centerAndZoom(point, 15); // 初始化地图,设置中心点坐标和地图级别
|
|
|
|
map.enableScrollWheelZoom(true);
|
|
|
|
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>
|