当前位置:网站首页>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
边栏推荐
- [problem solving] [show2012] random tree
- Lock锁
- English | day15, 16 x sentence true research daily sentence (clause disconnection, modification)
- 1-3 components and modules
- Paging SQL
- Go language, array, string, slice
- The new MySQL table has a self increasing ID of 20 bits. The reason is
- DDT + Excel for interface test
- Use case execution of robot framework
- Redis docker installation
猜你喜欢
Bottom processing of stack memory in browser
Sub database and sub table & shardingsphere
[PROJECT] small hat takeout (8)
Go language, array, string, slice
Pycham connects to the remote server and realizes remote debugging
Zhongang Mining: Fluorite Flotation Process
[pimf] openharmony paper Club - what is the experience of wandering in ACM survey
Nacos + aspnetcore + Ocelot actual combat code
Solution architect's small bag - 5 types of architecture diagrams
Nodejs installation and environment configuration
随机推荐
Handwritten event publish subscribe framework
◰GL-阴影贴图核心步骤
Error in v-on handler: "typeerror: cannot read property 'resetfields' of undefined"
PHP efficiently reads large files and processes data
1-1 NodeJS
Detailed explanation of Milvus 2.0 quality assurance system
Go language, array, string, slice
面试百分百问到的进程,你究竟了解多少
VLAN advanced technology, VLAN aggregation, super VLAN, sub VLAN
How to implement distributed locks with redis?
Log4j output log information to file
Promise (I)
1-2 JSX syntax rules
Kingdee Cloud Star API calling practice
[markdown notes]
Deeply understand the relevant knowledge of 3D model (modeling, material mapping, UV, normal), and the difference between displacement mapping, bump mapping and normal mapping
蓝桥杯省一之路06——第十二届省赛真题第二场
Summary of common websites
Lock锁
Regular filtering of Intranet addresses and segments