• Resolved fcvaymarsac

    (@fcvaymarsac)


    Hey there, I am struggling with the openstreetmap plugin, in the console it shows the following error :

    Uncaught ReferenceError: L is not defined
        at data:text/javascript;base64,dmFyIGxhdD00Ny41OTQwODU3NjAyODc2NDt2YXIgbG9uPS0xLjY4MTg4NTMyNTQ2NTMxNDY7bWFwPUwubWFwKCdzcF9vcGVuc3RyZWV0bWFwc19jb250YWluZXInLHt6b29tQ29udHJvbDohMX0pLnNldFZpZXcoW2xhdCxsb25dLDE1KTtMLnRpbGVMYXllcignaHR0cHM6Ly90aWxlLm9wZW5zdHJlZXRtYXAub3JnL3t6fS97eH0ve3l9LnBuZycse2F0dHJpYnV0aW9uOidNYXAgZGF0YSAmY29weTsgPGEgaHJlZj0iaHR0cHM6Ly93d3cub3BlbnN0cmVldG1hcC5vcmcvIj5PcGVuU3RyZWV0TWFwPC9hPiBjb250cmlidXRvcnMnLG1heFpvb206MTgsfSkuYWRkVG8obWFwKTttYXJrZXI9TC5tYXJrZXIoW2xhdCxsb25dKS5hZGRUbyhtYXApO21hcC5kcmFnZ2luZy5kaXNhYmxlKCk7bWFwLnRvdWNoWm9vbS5kaXNhYmxlKCk7bWFwLmRvdWJsZUNsaWNrWm9vbS5kaXNhYmxlKCk7bWFwLnNjcm9sbFdoZWVsWm9vbS5kaXNhYmxlKCk=:1:55
    (anonymous) @ data:text/javascript;base64,dmFyIGxhdD00Ny41OTQwODU3NjAyODc2NDt2YXIgbG9uPS0xLjY4MTg4NTMyNTQ2NTMxNDY7bWFwPUwubWFwKCdzcF9vcGVuc3RyZWV0bWFwc19jb250YWluZXInLHt6b29tQ29udHJvbDohMX0pLnNldFZpZXcoW2xhdCxsb25dLDE1KTtMLnRpbGVMYXllcignaHR0cHM6Ly90aWxlLm9wZW5zdHJlZXRtYXAub3JnL3t6fS97eH0ve3l9LnBuZycse2F0dHJpYnV0aW9uOidNYXAgZGF0YSAmY29weTsgPGEgaHJlZj0iaHR0cHM6Ly93d3cub3BlbnN0cmVldG1hcC5vcmcvIj5PcGVuU3RyZWV0TWFwPC9hPiBjb250cmlidXRvcnMnLG1heFpvb206MTgsfSkuYWRkVG8obWFwKTttYXJrZXI9TC5tYXJrZXIoW2xhdCxsb25dKS5hZGRUbyhtYXApO21hcC5kcmFnZ2luZy5kaXNhYmxlKCk7bWFwLnRvdWNoWm9vbS5kaXNhYmxlKCk7bWFwLmRvdWJsZUNsaWNrWm9vbS5kaXNhYmxlKCk7bWFwLnNjcm9sbFdoZWVsWm9vbS5kaXNhYmxlKCk=:1
    

    I don’t know too much PHP but I get what’s at it.

    var lat = 47.59408576028764;
    var lon = -1.6818853254653146;
    map = L.map('sp_openstreetmaps_container', {
        zoomControl: !1
    }).setView([lat, lon], 15);
    L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
        attribution: 'Map data &copy; <a >OpenStreetMap</a> contributors',
        maxZoom: 18,
    }).addTo(map);
    marker = L.marker([lat, lon]).addTo(map);
    map.dragging.disable();
    map.touchZoom.disable();
    map.doubleClickZoom.disable();
    map.scrollWheelZoom.disable()
    

    I believe L contains a map object, but L refers to nothing or doesn’t look initiated (like L new(Map); )when I load the sports-event page.

    it doesn’t affect the whole website as in when I put my grounds they’re working on the admin panel. It is only when I put the grounds on the matches. I don’t know if any update broke it and I don’t know how to fix.

    Any help is appreciated. Thank you in advance.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Savvas

    (@savvasha)

    Hi there @fcvaymarsac,

    It seems like the leaflet script is not loaded correctly. Can you disable your cache plugin/mechanism and clear your cache? Then try again to see if the error is still there. You may need to exclude leaflet script from combining with other script files.

    Thanks,
    Savvas

    Thread Starter fcvaymarsac

    (@fcvaymarsac)

    Thank you, completely forgot I had a sh*t ton of extensions.

    Roch

    (@rochesterj)

    I’m glad it’s resolved!

    Let us know if you need anything else.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘openstreetmap L is not defined.’ is closed to new replies.