Prettier on JavaScript examples [#383] (#438)

This commit is contained in:
Brandon Liu
2024-09-02 14:20:48 +08:00
committed by GitHub
parent 0fd91faf72
commit 2dd5bb7937
3 changed files with 114 additions and 99 deletions

View File

@@ -15,16 +15,19 @@
<body>
<div id="map"></div>
<script type="text/javascript">
const map = L.map('map').setView([0, 0], 0);
const map = L.map("map").setView([0, 0], 0);
const p = new pmtiles.PMTiles("https://pmtiles.io/stamen_toner(raster)CC-BY+ODbL_z3.pmtiles")
p.getHeader().then(h => {
let layer = pmtiles.leafletRasterLayer(p, {
maxzoom:h.maxZoom,
attribution:'Map tiles by <a href="http://stamen.com">Stamen Design</a>, under <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>. Data by <a href="http://openstreetmap.org">OpenStreetMap</a>, under <a href="http://www.openstreetmap.org/copyright">ODbL</a>.'
});
layer.addTo(map);
})
const p = new pmtiles.PMTiles(
"https://pmtiles.io/stamen_toner(raster)CC-BY+ODbL_z3.pmtiles"
);
p.getHeader().then((h) => {
let layer = pmtiles.leafletRasterLayer(p, {
maxzoom: h.maxZoom,
attribution:
'Map tiles by <a href="http://stamen.com">Stamen Design</a>, under <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>. Data by <a href="http://openstreetmap.org">OpenStreetMap</a>, under <a href="http://www.openstreetmap.org/copyright">ODbL</a>.',
});
layer.addTo(map);
});
</script>
</body>
</html>