当前位置:网站首页>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
边栏推荐
- Detailed explanation of Milvus 2.0 quality assurance system
- 【解决报错】Error in v-on handler: “TypeError: Cannot read property ‘resetFields’ of undefined”
- PyMySQL
- oracle 中快速获取表的列名列表
- Summary of common websites
- Modify the test case name generated by DDT
- Pycham connects to the remote server and realizes remote debugging
- [C#] 彻底搞明白深拷贝
- 织梦DEDECMS安全设置指南
- MySQL modify master database
猜你喜欢

详解牛客----手套

Go language, array, string, slice

Smart doc + Torna generate interface document

Document operation II (5000 word summary)

【PIMF】OpenHarmony啃论文俱乐部—在ACM Survey闲逛是什么体验

Feign report 400 processing

STM32__03—初识定时器

Selenium IDE and XPath installation of chrome plug-in

Sub database and sub table & shardingsphere

How to choose the wireless gooseneck anchor microphone and handheld microphone scheme
随机推荐
The new MySQL table has a self increasing ID of 20 bits. The reason is
TypeError: set_ figure_ params() got an unexpected keyword argument ‘figsize‘
1-2 characteristics of nodejs
Bytevcharts visual chart library, I have everything you want
[markdown notes]
[registration] tf54: engineer growth map and excellent R & D organization building
Aiot industrial technology panoramic structure - Digital Architecture Design (8)
VLAN advanced technology, VLAN aggregation, super VLAN, sub VLAN
1-3 nodejs installation list configuration and project environment
ACL 2022 | dialogved: a pre trained implicit variable encoding decoding model for dialogue reply generation
1-3 components and modules
Go language RPC communication
【解决报错】Error in v-on handler: “TypeError: Cannot read property ‘resetFields’ of undefined”
Shortcut keys (multiline)
PyMySQL
Milvus 2.0 质量保障系统详解
Nacos + aspnetcore + Ocelot actual combat code
Milvus 2.0 détails du système d'assurance de la qualité
MySQL restores data through binlog file
Do you really understand the principle of code scanning login?