Typo: KAMA to KMT

This commit is contained in:
2025-10-24 21:42:26 +04:00
parent 2969c6cb55
commit 5a815cb308
4 changed files with 11 additions and 11 deletions
+6 -6
View File
@@ -28,10 +28,10 @@ let zoomLevel
let styleFileName
switch (codeCarte) {
case 'KAMA':
case 'KMT':
centerCoordinates = [21.21, 1.36] // Afrique
zoomLevel = 2.7
styleFileName = 'ortho-jwe-KAMA.json'
styleFileName = 'ortho-jwe-KMT.json'
break
case 'KARUKERA':
centerCoordinates = [-61.4167, 16.25] // Guadeloupe
@@ -136,7 +136,7 @@ function startGame() {
const score = document.getElementById('score')
const chrono = document.getElementById('chrono')
question.innerHTML = `<p style='font-weight: bold;'>Trouve ${codeCarte === 'KAMA' ? 'le pays' : 'la commune'}</p><p id='commune' style='font-size: 30px; font-weight: bold; color: #1F51FF'>...</p>`
question.innerHTML = `<p style='font-weight: bold;'>Trouve ${codeCarte === 'KMT' ? 'le pays' : 'la commune'}</p><p id='commune' style='font-size: 30px; font-weight: bold; color: #1F51FF'>...</p>`
score.innerHTML = "<p style='color: green; font-weight: bold; margin-right: 2em;'>Correct ✅ : <span style='color: black;' id='OK'>0</span></p><p style='color: red; font-weight: bold;'>Faux ❌ : <span style='color: black;' id='KO'>0</span></p>"
chrono.innerHTML = "<p>Temps écoulé : <span id='time'></span><span style='margin-left: 1em;color: red; font-weight: bold;' id='penalty'></span></p>"
@@ -215,7 +215,7 @@ function communeObserver(){
*/
async function getFile(codeCarte) {
try {
const response = await fetch(`../kat/data/${codeCarte}/contours-${codeCarte === 'KAMA' ? 'pays' : 'communes'}.geojson`)
const response = await fetch(`../kat/data/${codeCarte}/contours-${codeCarte === 'KMT' ? 'pays' : 'communes'}.geojson`)
if (!response.ok) {
throw new Error(`Échec du chargement du fichier JSON : ${response.statusText}`)
}
@@ -338,7 +338,7 @@ function loadMap() {
map.setMaxZoom(9.5)
}
if (codeCarte === 'KAMA') {
if (codeCarte === 'KMT') {
/**
* Ajoute les contrôles de navigation à la carte, et définit les niveaux de zoom minimum et maximum pour l'Afrique'.
*/
@@ -381,7 +381,7 @@ function loadMap() {
*/
map.addSource('communes', {
'type': 'geojson',
'data': `../kat/data/${codeCarte}/contours-${codeCarte === 'KAMA' ? 'pays' : 'communes'}.geojson`,
'data': `../kat/data/${codeCarte}/contours-${codeCarte === 'KMT' ? 'pays' : 'communes'}.geojson`,
'promoteId': 'code'
})