fix: error on loading logo on maps #67

Merged
Thibaut merged 1 commits from dev into master 2025-11-18 21:02:59 +00:00

View File

@ -38,6 +38,7 @@ async function getData() {
let icon = null;
if (d.uuid !== null) {
try {
const img = await getMeta(`${api_url}/api/club/${d.uuid}/logo`);
let ratio = img.naturalHeight / img.naturalWidth;
@ -50,6 +51,9 @@ async function getData() {
//shadowAnchor: [4, 62], // the same for the shadow
popupAnchor: [0, -50 * ratio] // point from which the popup should open relative to the iconAnchor
});
}catch (e) {
console.log("Error loading image for club", d.name, e);
}
}
for (const m of d.training_location) {