Update
This commit is contained in:
parent
909416fbe3
commit
117e924f66
|
@ -23,6 +23,12 @@ export let communes = [
|
||||||
status: "forming",
|
status: "forming",
|
||||||
members: 1,
|
members: 1,
|
||||||
contact: ["https://discord.gg/Qk8KUk787z","DiscordInviteLink"]
|
contact: ["https://discord.gg/Qk8KUk787z","DiscordInviteLink"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
location: [["Switzerland"],[46.97045202584917, 8.05130091516525]],
|
||||||
|
status: "forming",
|
||||||
|
members: 1,
|
||||||
|
contact: ["https://discord.gg/Qk8KUk787z","DiscordInviteLink"]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -39,6 +45,16 @@ for (let c of communes) {
|
||||||
|
|
||||||
export let communesMarkersLayer = L.layerGroup()
|
export let communesMarkersLayer = L.layerGroup()
|
||||||
|
|
||||||
|
export function translate(content, x) {
|
||||||
|
let out = content[x]
|
||||||
|
if (out==undefined) {
|
||||||
|
return x
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return out
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
export function addMarkersCommunes(map,content,locale) {
|
export function addMarkersCommunes(map,content,locale) {
|
||||||
for (let g of communes) {
|
for (let g of communes) {
|
||||||
let coordinates
|
let coordinates
|
||||||
|
@ -55,7 +71,7 @@ export function addMarkersCommunes(map,content,locale) {
|
||||||
locationString = location.map(x => x).join(", ")
|
locationString = location.map(x => x).join(", ")
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
locationString = location.map(x => content[x]).join(", ")
|
locationString = location.map(x => translate(content, x)).join(", ")
|
||||||
}
|
}
|
||||||
|
|
||||||
text += fieldText + locationString + "<br>"
|
text += fieldText + locationString + "<br>"
|
||||||
|
|
|
@ -113,8 +113,6 @@ export function translate(content, x) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function addMarkersToLayer(g,layer,content,locale) {
|
function addMarkersToLayer(g,layer,content,locale) {
|
||||||
let coordinates
|
let coordinates
|
||||||
let text = "<b>"+content["Group"]+"</b><br>"
|
let text = "<b>"+content["Group"]+"</b><br>"
|
||||||
|
|
|
@ -23,6 +23,12 @@ export let communes = [
|
||||||
status: "forming",
|
status: "forming",
|
||||||
members: 1,
|
members: 1,
|
||||||
contact: ["https://discord.gg/Qk8KUk787z","DiscordInviteLink"]
|
contact: ["https://discord.gg/Qk8KUk787z","DiscordInviteLink"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
location: [["Switzerland"],[46.97045202584917, 8.05130091516525]],
|
||||||
|
status: "forming",
|
||||||
|
members: 1,
|
||||||
|
contact: ["https://discord.gg/Qk8KUk787z","DiscordInviteLink"]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -39,6 +45,16 @@ for (let c of communes) {
|
||||||
|
|
||||||
export let communesMarkersLayer = L.layerGroup()
|
export let communesMarkersLayer = L.layerGroup()
|
||||||
|
|
||||||
|
export function translate(content, x) {
|
||||||
|
let out = content[x]
|
||||||
|
if (out==undefined) {
|
||||||
|
return x
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return out
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
export function addMarkersCommunes(map,content,locale) {
|
export function addMarkersCommunes(map,content,locale) {
|
||||||
for (let g of communes) {
|
for (let g of communes) {
|
||||||
let coordinates
|
let coordinates
|
||||||
|
@ -55,7 +71,7 @@ export function addMarkersCommunes(map,content,locale) {
|
||||||
locationString = location.map(x => x).join(", ")
|
locationString = location.map(x => x).join(", ")
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
locationString = location.map(x => content[x]).join(", ")
|
locationString = location.map(x => translate(content, x)).join(", ")
|
||||||
}
|
}
|
||||||
|
|
||||||
text += fieldText + locationString + "<br>"
|
text += fieldText + locationString + "<br>"
|
||||||
|
|
|
@ -113,8 +113,6 @@ export function translate(content, x) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function addMarkersToLayer(g,layer,content,locale) {
|
function addMarkersToLayer(g,layer,content,locale) {
|
||||||
let coordinates
|
let coordinates
|
||||||
let text = "<b>"+content["Group"]+"</b><br>"
|
let text = "<b>"+content["Group"]+"</b><br>"
|
||||||
|
|
Loading…
Reference in New Issue