Switch Leaflet from unpkg to jsdelivr CDN to avoid sourcemap requests

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Serreau Jovann
2026-03-20 18:38:07 +01:00
parent 93ed10c170
commit c1292bb2cd
2 changed files with 5 additions and 5 deletions

View File

@@ -7,11 +7,11 @@ export function initEventMap() {
const link = document.createElement('link')
link.rel = 'stylesheet'
link.href = 'https://unpkg.com/leaflet@1.9.4/dist/leaflet.css'
link.href = 'https://cdn.jsdelivr.net/npm/leaflet@1.9.4/dist/leaflet.min.css'
document.head.appendChild(link)
const script = document.createElement('script')
script.src = 'https://unpkg.com/leaflet@1.9.4/dist/leaflet.js'
script.src = 'https://cdn.jsdelivr.net/npm/leaflet@1.9.4/dist/leaflet.min.js'
script.onload = () => geocodeAndRender(address, mapEl)
document.head.appendChild(script)
}