当前位置:网站首页>Basic case of Baidu map
Basic case of Baidu map
2022-04-23 17:03:00 【Eli-sun】
<script type="text/javascript"
src="https://api.map.baidu.com/api?v=1.0&type=webgl&ak=cXG18I5SNt2EZNvG7CVyE4jjTr8swlo4"
></script>
// This was introduced ak To apply for a Baidu map developer account , You can click in through the following website
https://lbsyun.baidu.com/index.php?title=jspopularGL/guide/helloworld
<!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{
height: 100%;
height: 100%;
margin: 0;
padding: 0;
}
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') // 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
</script>
</body>
</html>
版权声明
本文为[Eli-sun]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230554289813.html
边栏推荐
- feign报400处理
- Detailed explanation of information abstract, digital signature, digital certificate, symmetric encryption and asymmetric encryption
- 1-2 characteristics of nodejs
- TypeError: set_figure_params() got an unexpected keyword argument ‘figsize‘
- Expression "func" tSource, object "to expression" func "tSource, object" []
- Mock test
- Preliminary understanding of promse
- ACL 2022 | DialogVED:用于对话回复生成的预训练隐变量编码-解码模型
- ◰GL-阴影贴图核心步骤
- MySQL modify master database
猜你喜欢
Bytevcharts visual chart library, I have everything you want
Nifi fast installation and file synchronization
博士申请 | 厦门大学信息学院郭诗辉老师团队招收全奖博士/博后/实习生
How to choose the wireless gooseneck anchor microphone and handheld microphone scheme
Path environment variable
Node access to Alipay open platform sandbox to achieve payment function
Deepinv20 installation MariaDB
[pimf] openharmony paper Club - what is the experience of wandering in ACM survey
Detailed explanation of the penetration of network security in the shooting range
Solution architect's small bag - 5 types of architecture diagrams
随机推荐
◰ GL shadow map core steps
Linux MySQL data timing dump
【题解】[SHOI2012] 随机树
Summary of common websites
Idea of batch manufacturing test data, with source code
STM32__ 03 - beginner timer
Shell脚本——Shell编程规范及变量
Aiot industrial technology panoramic structure - Digital Architecture Design (8)
How much do you know about the process of the interview
Introduction to how to set up LAN
【PIMF】OpenHarmony啃论文俱乐部—在ACM Survey闲逛是什么体验
Nodejs reads the local JSON file through require. Unexpected token / in JSON at position appears
Document operation II (5000 word summary)
MySQL restores data through binlog file
How vscode compares the similarities and differences between two files
vscode如何比较两个文件的异同
websocket
Loggie source code analysis source file module backbone analysis
计算饼状图百分比
Get the column name list of the table quickly in Oracle