3 Star 0 Fork 0

mirrors_ReneNyffenegger/about-Leaflet

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
hello-world.html 1.04 KB
一键复制 编辑 原始数据 按行查看 历史
Rene Nyffenegger 提交于 2022-09-25 22:40 . + hello-world.html
<head>
<link rel = "stylesheet"
href = "https://unpkg.com/leaflet@1.9.1/dist/leaflet.css"
integrity = "sha256-sA+zWATbFveLLNqWO2gtiw3HL/lh1giY/Inf1BJ0z14="
crossorigin = "" />
<script src = "https://unpkg.com/leaflet@1.9.1/dist/leaflet.js"
integrity = "sha256-NDI0K41gVbWqfkkaHj15IzU7PtMoelkzyKp8TOaFQ3s="
crossorigin = "">
</script>
</head>
<body>
<div id="map" />
<style>
#map {
position: absolute;
top : 0px ;
left : 0px ;
height : 100% ;
width : 100% ;
}
</style>
<script>
const lat = 47.5162;
const lon = 8.6468;
const zoom = 17;
const map = L.map('map').setView([lat, lon], zoom);
L.tileLayer(
'https://tile.openstreetmap.org/{z}/{x}/{y}.png',
// 'https://api.maptiler.com/maps/bright/256/{z}/{x}/{y}.png?key=…',
{
// minZoom: 1, maxZoom: 19
attribution: '© OpenStreetMap' // https://www.openstreetmap.org/copyright
}).addTo(map);
</script>
</body>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mirrors_ReneNyffenegger/about-Leaflet.git
git@gitee.com:mirrors_ReneNyffenegger/about-Leaflet.git
mirrors_ReneNyffenegger
about-Leaflet
about-Leaflet
master

搜索帮助