当前位置:网站首页>Baidu Map Case - modify map style
Baidu Map Case - modify map style
2022-04-23 17:04:00 【Eli-sun】
https://lbsyun.baidu.com/apiconsole/custommap
Click... On this website Featured service platform - Personalized maps - Map template - Select a map style - Click publish style - Copy id Into the code
<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
// Custom map style
// You can also use styleJsion The way to change the style
map.setMapStyleV2({
styleId:'06649c73ab8ae3adffe6ea88ed400b23'
})
</script>
</body>
</html>
版权声明
本文为[Eli-sun]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230554289659.html
边栏推荐
- RTKLIB 2.4.3源码笔记
- AIOT产业技术全景结构-数字化架构设计(8)
- How to build tiktok user trust and drive fan growth
- ACL 2022 | dialogved: a pre trained implicit variable encoding decoding model for dialogue reply generation
- 线性代数感悟之1
- Get the column name list of the table quickly in Oracle
- Summary of common websites
- 计算饼状图百分比
- On lambda powertools typescript
- Aiot industrial technology panoramic structure - Digital Architecture Design (8)
猜你喜欢
STM32__ 03 - beginner timer
oracle 中快速获取表的列名列表
Pycham connects to the remote server and realizes remote debugging
Dancenn: overview of byte self-developed 100 billion scale file metadata storage system
Lock lock
Milvus 2.0 質量保障系統詳解
Smart doc + Torna generate interface document
Nacos + aspnetcore + Ocelot actual combat code
How to build tiktok user trust and drive fan growth
文件操作《二》(5000字总结篇)
随机推荐
1-3 nodejs installation list configuration and project environment
Scope and scope chain in JS
聊一聊浏览器缓存控制
Camtasia2022软件新增功能介绍
PHP efficiently reads large files and processes data
Read a blog, re understand closures and tidy up
Production environment——
面试百分百问到的进程,你究竟了解多少
[C#] 彻底搞明白深拷贝
ACL 2022 | DialogVED:用于对话回复生成的预训练隐变量编码-解码模型
Promise (II)
Kingdee Cloud Star API calling practice
Paging the list collection
【解决报错】Error in v-on handler: “TypeError: Cannot read property ‘resetFields’ of undefined”
Bytevcharts visual chart library, I have everything you want
1-3 components and modules
Pycham connects to the remote server and realizes remote debugging
杂文 谈谈古典的《拆掉思维里的墙》
[PROJECT] small hat takeout (8)
Kunteng full duplex digital wireless transceiver chip kt1605 / kt1606 / kt1607 / kt1608 is suitable for interphone scheme