export let coops = [
{
logo: "chiron_logo",
name: "Chiron Health",
location: ["EstoniaKohtlaJarve",[59.40338782864918, 27.286240058760324]],
market: "wellnessAndHealth",
workers: 2,
status: "inDevelopment",
website: "chrn.health",
contact: ["https://chat.whatsapp.com/BhnmUNljUxJ2AjeHUwyTKh","WhatsAppInviteLink"],
description: "descriptionChironHealth"
},
{
logo: "kuusk_logo",
name: "Kuusk",
location: ["EstoniaKohtlaJarve",[59.405466538976185, 27.289104862336302]],
market: "herbalTeas",
workers: 1,
status: "inDevelopment",
website: "-",
contact: ["https://chat.whatsapp.com/BhnmUNljUxJ2AjeHUwyTKh","WhatsAppInviteLink"],
description: "kuuskDescription"
}
]
export function addMarkersCoops(map,content) {
for (let g of coops) {
let coordinates
let text = ""
for (let field in g) {
let fieldText
if (field!="logo") {
fieldText = content[field] + ": "
}
if (field=="logo") {
text += "" + "
"
}
else if (field=="contact") {
text += fieldText + "" + content[g.contact[1]] + "" + "
"
}
else if (field=="website") {
text += fieldText + "" + g.website + "" + "
"
}
else if (field=="location") {
text += fieldText + content[g[field][0]] + "
"
coordinates = g[field][1]
}
else if (field=="market" || field=="status" || field=="description") {
text += fieldText + content[g[field]] + "
"
}
else {
text += fieldText + g[field] + "
"
}
}
L.marker(coordinates).addTo(map).bindPopup(text)
}
}