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