Réparer les scripts intégrés aux vues

This commit is contained in:
Alexandre NOEL 2026-09-03 23:08:03 +02:00
commit 64ce1285aa
12 changed files with 112 additions and 97 deletions

View file

@ -32,17 +32,17 @@ $obfuscate = static fn (string$value): string => implode('', array_reverse(mb_st
(() => {
const map = L.map('association-map', {
scrollWheelZoom: false
}).setView([ < ? = json_encode($lat) ? > , < ? = json_encode($lng) ? > ], 15);
}).setView([ <?= json_encode($lat) ?> , <?= json_encode($lng) ?> ], 15);
L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 19,
attribution: '&copy; OpenStreetMap'
}).addTo(map);
const popup = document.createElement('div');
const name = document.createElement('strong');
name.textContent = < ? = json_encode($association, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES) ? > ;
popup.append(name, document.createElement('br'), document.createTextNode( < ? = json_encode($fullAddress,
JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES) ? > ));
L.marker([ < ? = json_encode($lat) ? > , < ? = json_encode($lng) ? > ]).addTo(map).bindPopup(popup)
name.textContent = <?= json_encode($association, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES) ?> ;
popup.append(name, document.createElement('br'), document.createTextNode( <?= json_encode($fullAddress,
JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES) ?> ));
L.marker([ <?= json_encode($lat) ?> , <?= json_encode($lng) ?> ]).addTo(map).bindPopup(popup)
.openPopup();
})();