当前位置:网站首页>Further optimize Baidu map data visualization
Further optimize Baidu map data visualization
2022-04-23 17:03: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>
<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);
function init(){
var map = new BMapGL.Map('map') // Initialize map
var point = new BMapGL.Point(116.404,39.915) // Set map coordinates
map.centerAndZoom(point, 10) // Central Map display level
map.enableScrollWheelZoom(true) // Zoom in and out of the map through the scroll wheel
}
// onload Page loading complete
window.onload = function() {
// src="https://api.map.baidu.com/api?v=1.0&type=webgl&ak=cXG18I5SNt2EZNvG7CVyE4jjTr8swlo4"
var script = document.createElement('script')
// To initialize the map, you can src Add one at the end &callback=init Add one more callback Parameter this parameter points to init Method
script.src = "https://api.map.baidu.com/api?v=1.0&type=webgl&ak=cXG18I5SNt2EZNvG7CVyE4jjTr8swlo4&callback=init"
document.body.appendChild(script)
}
</script>
</body>
</html>
版权声明
本文为[Eli-sun]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230554289772.html
边栏推荐
- Copy constructor shallow copy and deep copy
- Generate random numbers with high quality and Gaussian distribution
- PostgreSQL column storage and row storage
- Pycham connects to the remote server and realizes remote debugging
- Blue Bridge Cup provincial road 06 -- the second game of the 12th provincial competition
- [problem solving] [show2012] random tree
- Milvus 2.0 质量保障系统详解
- PHP高效读大文件处理数据
- Selenium IDE and XPath installation of chrome plug-in
- freeCodeCamp----shape_ Calculator exercise
猜你喜欢
Modify the test case name generated by DDT
Deepinv20 installation MariaDB
Change the password after installing MySQL in Linux
Project framework of robot framework
Bottom processing of stack memory in browser
Zhongang Mining: Fluorite Flotation Process
Rtklib 2.4.3 source code Notes
Smart doc + Torna generate interface document
Nodejs installation and environment configuration
feign报400处理
随机推荐
Summary of common websites
AIOT产业技术全景结构-数字化架构设计(8)
About stream flow, write it down briefly------
批量制造测试数据的思路,附源码
_ Mold_ Board_
扫码登录的原理你真的了解吗?
feign报400处理
Handwritten event publish subscribe framework
Smart doc + Torna generate interface document
Calculate pie chart percentage
File upload and download of robot framework
Detailed explanation of Milvus 2.0 quality assurance system
Use case labeling mechanism of robot framework
Milvus 2.0 質量保障系統詳解
PostgreSQL列存与行存
ACL 2022 | DialogVED:用于对话回复生成的预训练隐变量编码-解码模型
On lambda powertools typescript
BUG_ me
Nacos + aspnetcore + Ocelot actual combat code
Change the password after installing MySQL in Linux