Skip to content

Instantly share code, notes, and snippets.

@mouette
Created November 29, 2024 21:57
Show Gist options
  • Save mouette/a3ae740429367fc778ee0d9eeb9c28fe to your computer and use it in GitHub Desktop.
Save mouette/a3ae740429367fc778ee0d9eeb9c28fe to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<title>Cassini</title>
<link rel="stylesheet" href="https://unpkg.com/leaflet/dist/leaflet.css" />
<script src="https://unpkg.com/leaflet/dist/leaflet.js"></script>
<style>
#map {
height: 100vh;
}
</style>
</head>
<body>
<div id="map"></div>
<script>
var map = L.map('map').setView([45.80, 4.98], 10);
L.tileLayer(
"https://data.geopf.fr/wmts?" +
"layer=BNF-IGNF_GEOGRAPHICALGRIDSYSTEMS.CASSINI" +
"&style=normal" +
"&tilematrixset=PM" +
"&Service=WMTS&Request=GetTile&Version=1.0.0" +
"&Format=image%2Fpng" +
"&TileMatrix={z}&TileCol={x}&TileRow={y}",
{
minZoom: 0, maxZoom: 14,
attribution: "IGN-F/Geoportail",
tileSize: 256 // les tuiles du Géooportail font 256x256px
}
).addTo(map);
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment