2023-06-24 20:44:16 +07:00
|
|
|
export let groups = [
|
2023-07-10 21:16:02 +07:00
|
|
|
{
|
|
|
|
location: ["CanadaHalifax",[44.65166135030067, -63.59289968306866]],
|
|
|
|
members: 2,
|
|
|
|
contact: ["https://discord.gg/xAPZmyr8B6","DiscordInviteLink"]
|
|
|
|
},
|
2023-06-28 18:00:41 +07:00
|
|
|
{
|
2023-07-09 19:25:09 +07:00
|
|
|
location: ["DenmarkCopenhagen",[55.6840661150132, 12.557133959514688]],
|
2023-07-06 05:25:38 +07:00
|
|
|
members: 1,
|
2023-07-09 19:25:09 +07:00
|
|
|
contact: ["https://discord.gg/xAPZmyr8B6","DiscordInviteLink"]
|
2023-06-28 18:00:41 +07:00
|
|
|
},
|
2023-07-06 05:25:38 +07:00
|
|
|
{
|
2023-07-09 19:25:09 +07:00
|
|
|
location: ["DenmarkKolding", [55.49261908652738, 9.470268969851743]],
|
2023-07-06 05:25:38 +07:00
|
|
|
members: 1,
|
2023-07-09 19:25:09 +07:00
|
|
|
contact: ["https://chat.whatsapp.com/BhnmUNljUxJ2AjeHUwyTKh","WhatsAppInviteLink"]
|
2023-07-06 05:25:38 +07:00
|
|
|
},
|
2023-06-24 20:44:16 +07:00
|
|
|
{
|
2023-07-09 19:25:09 +07:00
|
|
|
location: ["EstoniaKohtlaJarve", [59.40629447076191, 27.280605339416322]],
|
2023-06-24 20:44:16 +07:00
|
|
|
members: 3,
|
2023-07-09 19:25:09 +07:00
|
|
|
contact: ["https://chat.whatsapp.com/BhnmUNljUxJ2AjeHUwyTKh","WhatsAppInviteLink"]
|
2023-06-26 03:20:08 +07:00
|
|
|
},
|
|
|
|
{
|
2023-07-09 19:25:09 +07:00
|
|
|
location: ["GreeceAthens", [37.94877252621736, 23.677622972996158]],
|
2023-06-26 03:20:08 +07:00
|
|
|
members: 1,
|
2023-07-09 19:25:09 +07:00
|
|
|
contact: ["https://chat.whatsapp.com/BhnmUNljUxJ2AjeHUwyTKh","WhatsAppInviteLink"]
|
2023-06-26 03:20:08 +07:00
|
|
|
},
|
|
|
|
{
|
2023-07-09 19:25:09 +07:00
|
|
|
location: ["LatviaRiga", [56.94748425529816, 24.003027136431925]],
|
2023-06-26 03:20:08 +07:00
|
|
|
members: 2,
|
2023-07-09 19:25:09 +07:00
|
|
|
contact: ["https://chat.whatsapp.com/BhnmUNljUxJ2AjeHUwyTKh","WhatsAppInviteLink"]
|
2023-06-28 03:24:18 +07:00
|
|
|
},
|
2023-06-24 20:44:16 +07:00
|
|
|
]
|
|
|
|
|
2023-07-09 19:25:09 +07:00
|
|
|
export function addMarkersGroups(map,content) {
|
2023-06-24 20:44:16 +07:00
|
|
|
for (let g of groups) {
|
|
|
|
let coordinates
|
|
|
|
let text = ""
|
|
|
|
for (let field in g) {
|
2023-07-03 03:07:45 +07:00
|
|
|
let fieldText = content[field] + ": "
|
2023-06-24 20:44:16 +07:00
|
|
|
if (field=="contact") {
|
2023-07-09 19:25:09 +07:00
|
|
|
text += fieldText + "<a href='" + g.contact[0] + "' target='_blank' rel=noreferrer>" + content[g.contact[1]] + "</a>"
|
2023-06-24 20:44:16 +07:00
|
|
|
}
|
|
|
|
else if (field=="location") {
|
2023-07-09 19:25:09 +07:00
|
|
|
text += fieldText + content[g[field][0]] + "<br>"
|
2023-06-24 20:44:16 +07:00
|
|
|
coordinates = g[field][1]
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
text += fieldText + g[field] + "<br>"
|
|
|
|
}
|
|
|
|
}
|
2023-07-10 21:22:33 +07:00
|
|
|
var markerIcon = new L.Icon({
|
2023-07-10 21:37:04 +07:00
|
|
|
iconUrl: 'https://www.libsoc.org/img/common/markers/marker-green.png',
|
2023-06-24 20:44:16 +07:00
|
|
|
shadowUrl: 'https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.7/images/marker-shadow.png',
|
|
|
|
iconSize: [25, 41],
|
|
|
|
iconAnchor: [12, 41],
|
|
|
|
popupAnchor: [1, -34],
|
|
|
|
shadowSize: [41, 41]
|
|
|
|
});
|
2023-07-10 21:22:33 +07:00
|
|
|
let marker = L.marker(coordinates, {icon: markerIcon})
|
2023-06-24 20:44:16 +07:00
|
|
|
marker.addTo(map).bindPopup(text)
|
|
|
|
}
|
|
|
|
}
|