maringetxway commited on
Commit
3b4890c
·
verified ·
1 Parent(s): 22d93f2

Update script.js

Browse files
Files changed (1) hide show
  1. script.js +11 -4
script.js CHANGED
@@ -26,14 +26,21 @@ function addMarkers(data, icon) {
26
  const lat = parseFloat(entry.latitude || entry.Latitude);
27
  const lng = parseFloat(entry.longitude || entry.Longitude);
28
  const name = entry.name || entry.Name || 'Unknown';
29
- const address = entry.address || entry.Address || '';
30
- const nbPeople = entry.nb_of_people || entry.Nb_of_people || '';
31
- const discordUsername = entry.discord_username || entry.Discord_username || '';
32
 
33
  if (!isNaN(lat) && !isNaN(lng)) {
34
  L.marker([lat, lng], { icon: icon })
35
  .addTo(map)
36
- .bindPopup(`<strong>${name}</strong><br>${desc}`);
 
 
 
 
 
 
 
37
  }
38
  });
39
  }
 
26
  const lat = parseFloat(entry.latitude || entry.Latitude);
27
  const lng = parseFloat(entry.longitude || entry.Longitude);
28
  const name = entry.name || entry.Name || 'Unknown';
29
+ const address = entry.address || entry.Address || 'N/A';
30
+ const nbPeople = entry.nb_of_people || entry.Nb_of_people || 'N/A';
31
+ const discordUsername = entry.discord_username || entry.Discord_username || 'N/A';
32
 
33
  if (!isNaN(lat) && !isNaN(lng)) {
34
  L.marker([lat, lng], { icon: icon })
35
  .addTo(map)
36
+ .bindPopup(`
37
+ <strong>${name}</strong><br>
38
+ ${desc}<br>
39
+ <strong>Address:</strong> ${address}<br>
40
+ <strong>Nb of People:</strong> ${nbPeople}<br>
41
+ <strong>Discord Username:</strong> ${discordUsername}
42
+ `);
43
+
44
  }
45
  });
46
  }