fix: error on loading logo on maps
All checks were successful
Deploy Production Server / if_merged (pull_request) Successful in 9m58s
All checks were successful
Deploy Production Server / if_merged (pull_request) Successful in 9m58s
This commit is contained in:
parent
f46e268d39
commit
53509820c6
@ -38,6 +38,7 @@ async function getData() {
|
|||||||
|
|
||||||
let icon = null;
|
let icon = null;
|
||||||
if (d.uuid !== null) {
|
if (d.uuid !== null) {
|
||||||
|
try {
|
||||||
const img = await getMeta(`${api_url}/api/club/${d.uuid}/logo`);
|
const img = await getMeta(`${api_url}/api/club/${d.uuid}/logo`);
|
||||||
let ratio = img.naturalHeight / img.naturalWidth;
|
let ratio = img.naturalHeight / img.naturalWidth;
|
||||||
|
|
||||||
@ -50,6 +51,9 @@ async function getData() {
|
|||||||
//shadowAnchor: [4, 62], // the same for the shadow
|
//shadowAnchor: [4, 62], // the same for the shadow
|
||||||
popupAnchor: [0, -50 * ratio] // point from which the popup should open relative to the iconAnchor
|
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) {
|
for (const m of d.training_location) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user