Move map files to 'kat'
This commit is contained in:
@@ -8,10 +8,10 @@
|
||||
<body>
|
||||
<h1>Choisis une carte</h1>
|
||||
<ul>
|
||||
<li><a href="971.php">Guadeloupe (971)</a></li>
|
||||
<li><a href="972.php">Martinique (972)</a></li>
|
||||
<li><a href="973.php">Guyane (973)</a></li>
|
||||
<li><a href="974.php">La Réunion (974)</a></li>
|
||||
<li><a href="kat/971.php">Guadeloupe (971)</a></li>
|
||||
<li><a href="kat/972.php">Martinique (972)</a></li>
|
||||
<li><a href="kat/973.php">Guyane (973)</a></li>
|
||||
<li><a href="kat/974.php">La Réunion (974)</a></li>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -47,7 +47,7 @@ switch (codeDepartement) {
|
||||
*/
|
||||
const map = new maplibregl.Map({
|
||||
container: 'map',
|
||||
style: `./kat/styles/${styleFileName}`,
|
||||
style: `../kat/styles/${styleFileName}`,
|
||||
center: centerCoordinates,
|
||||
zoom: zoomLevel
|
||||
})
|
||||
@@ -112,7 +112,7 @@ const correctAnswers = new Set()
|
||||
*/
|
||||
async function getFile(codeDepartement) {
|
||||
try {
|
||||
const response = await fetch(`./kat/data/${codeDepartement}/contours-communes.geojson`)
|
||||
const response = await fetch(`../kat/data/${codeDepartement}/contours-communes.geojson`)
|
||||
if (!response.ok) {
|
||||
throw new Error(`Échec du chargement du fichier JSON : ${response.statusText}`)
|
||||
}
|
||||
@@ -135,7 +135,7 @@ async function getFile(codeDepartement) {
|
||||
async function getCommuneCenterCoordinates(codeDepartement, communeCode) {
|
||||
try {
|
||||
// Utiliser fetch pour lire le fichier "centres.json"
|
||||
const response = await fetch(`./kat/data/${codeDepartement}/centres.json`)
|
||||
const response = await fetch(`../kat/data/${codeDepartement}/centres.json`)
|
||||
if (!response.ok) {
|
||||
throw new Error(`Échec du chargement du fichier JSON : ${response.statusText}`)
|
||||
}
|
||||
@@ -229,7 +229,7 @@ map.on('load', async () => {
|
||||
*/
|
||||
map.addSource('communes', {
|
||||
'type': 'geojson',
|
||||
'data': `./kat/data/${codeDepartement}/contours-communes.geojson`,
|
||||
'data': `../kat/data/${codeDepartement}/contours-communes.geojson`,
|
||||
'promoteId': 'code'
|
||||
})
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<title>JWE - KAT</title>
|
||||
<link rel="stylesheet" href="https://unpkg.com/maplibre-gl/dist/maplibre-gl.css" />
|
||||
<link rel="stylesheet" href="./css/map.css" />
|
||||
<link rel="stylesheet" href="../css/map.css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1 id="title">Guadeloupe (971)</h1>
|
||||
@@ -21,6 +21,6 @@
|
||||
<div id="map"></div>
|
||||
|
||||
<script src="https://unpkg.com/maplibre-gl/dist/maplibre-gl.js"></script>
|
||||
<script src="./js/map.js"></script>
|
||||
<script src="../js/map.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<title>JWE - KAT</title>
|
||||
<link rel="stylesheet" href="https://unpkg.com/maplibre-gl/dist/maplibre-gl.css" />
|
||||
<link rel="stylesheet" href="./css/map.css" />
|
||||
<link rel="stylesheet" href="../css/map.css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1 id="title">Martinique (972)</h1>
|
||||
@@ -21,6 +21,6 @@
|
||||
<div id="map"></div>
|
||||
|
||||
<script src="https://unpkg.com/maplibre-gl/dist/maplibre-gl.js"></script>
|
||||
<script src="./js/map.js"></script>
|
||||
<script src="../js/map.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<title>JWE - KAT</title>
|
||||
<link rel="stylesheet" href="https://unpkg.com/maplibre-gl/dist/maplibre-gl.css" />
|
||||
<link rel="stylesheet" href="./css/map.css" />
|
||||
<link rel="stylesheet" href="../css/map.css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1 id="title">Guyane (973)</h1>
|
||||
@@ -21,6 +21,6 @@
|
||||
<div id="map"></div>
|
||||
|
||||
<script src="https://unpkg.com/maplibre-gl/dist/maplibre-gl.js"></script>
|
||||
<script src="./js/map.js"></script>
|
||||
<script src="../js/map.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<title>JWE - KAT</title>
|
||||
<link rel="stylesheet" href="https://unpkg.com/maplibre-gl/dist/maplibre-gl.css" />
|
||||
<link rel="stylesheet" href="./css/map.css" />
|
||||
<link rel="stylesheet" href="../css/map.css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1 id="title">La Réunion (974)</h1>
|
||||
@@ -21,6 +21,6 @@
|
||||
<div id="map"></div>
|
||||
|
||||
<script src="https://unpkg.com/maplibre-gl/dist/maplibre-gl.js"></script>
|
||||
<script src="./js/map.js"></script>
|
||||
<script src="../js/map.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user