当前位置:网站首页>百度地图3D旋转和倾斜角度的调整
百度地图3D旋转和倾斜角度的调整
2022-04-23 05:56:00 【Eli-sun】
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script type="text/javascript"
src="https://api.map.baidu.com/api?v=1.0&type=webgl&ak=cXG18I5SNt2EZNvG7CVyE4jjTr8swlo4"
></script>
<style>
html, body{
height: 100%;
height: 100%;
margin: 0;
padding: 0;
}
#map{
height: 100%;
width: 100%;
margin: 0;
padding: 0;
}
.anchorBL, .BMap_cpyCtrl{
display: none;
}
</style>
</head>
<body>
<!--
可以在百度地图里面-开发文档-坐标拾取器 搜索到自己想要的地点并获取到地点的经纬度
-->
<div id="map"></div>
<script>
console.log(window.BMapGL);
var map = new BMapGL.Map('map') // 初始化地图
var point = new BMapGL.Point(116.196608,40.253428) // 设置地图坐标
map.centerAndZoom(point, 18) // 中心的 地图的显示级别
map.enableScrollWheelZoom(true) // 通过滚轮对地图进行放大和缩小
var heading = 0
map.setHeading(heading) // 调整旋转角度
map.setTilt(70) // 调整倾斜角度
// setInterval(()=>{
// heading++
// map.setHeading(heading)
// },500)
</script>
</body>
</html>
版权声明
本文为[Eli-sun]所创,转载请带上原文链接,感谢
https://blog.csdn.net/vfjcgg/article/details/121815255
边栏推荐
- JS实现私有属性
- Joseph sequence segment tree o (nlogn)
- Add serial number to El table
- 使用jsonwebtoken生成访问密钥
- 锚点定位——如何设置锚点居页面顶部距离,锚点定位并距离顶部一定偏移
- Makefile foundation, common functions and general makefile
- The difference between single quotation mark, double quotation mark and back quotation mark in shell script
- 查漏补缺(八)
- Analysis and setting of dead time
- Node模版引擎(ejs, art-template)
猜你喜欢
随机推荐
小程序学习笔记(一)
var、let、const之间的区别
【ES6】 Promise相关(事件循环,宏/微任务,promise,await/await)
提交本地仓库并同步码云仓库
FOC single resistance sampling position loop control servo motor
1-3 NodeJS的安装之清单配置与跑项目环境
启用AHCI后无法启动系统
Set up a personal blog of jpress
.Net Core 下使用 Quartz —— 【5】作业和触发器之触发器的通用属性和优先级
Node的数据库编程
2020 Jiangsu Collegiate Programming Contest-A.Array
VHDL finite state machine (FSM) code example
el-table添加序号
服务器常见错误代码 总结
条形码与二维码的生成
元编程,代理Proxy与反射Reflect
Wildcards and special symbols for shell scripts
ASP.NET CORE 依赖注入服务生命周期
js面试题:fn.call.call.call.call(fn2) 解析
HDU-Memory Control