• Resolved fvenuto

    (@fvenuto)


    Uncaught Error: Map container not found.
    at e._initContainer (leaflet.js?ver=5.3.2:5)
    at e.initialize (leaflet.js?ver=5.3.2:5)
    at new e (leaflet.js?ver=5.3.2:5)
    at Object.t.map (leaflet.js?ver=5.3.2:5)
    at cttmMapLoop (travelersmap.js?ver=5.3.2:80)
    at Array.forEach (<anonymous>)
    at HTMLDocument.<anonymous> (travelersmap.js?ver=5.3.2:30)

    I need the map to show on Popup.
    but the problem is that the Map Container is initialized at document ready and document ready has not popup on it.

    Can you maybe add a function or something to call when we use it in a popup?

    Or can you suggest me how i can fix this?
    Thanks

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

Viewing 1 replies (of 1 total)
  • Plugin Author Camille V

    (@socrapop)

    Hello!

    I see the problem, Travelers’ Map is made like this:

    • On shortcode, the PHP code creates a div with the map container ID of your map on your page. It then send this ID and all the markers informations to the plugin’s javascript file via wp_localize_script(), a wordpress function.
    • On page load, the javascript is finding the container with the ID given, and put all the markers on it.

    I see that you are using Elementor popup builder, and when I click the button, the popup HTML is created at the end of your body, with the map container in it.
    So the error is here, Travelers’ map can’t find the map container on load because the HTML is not in the page, it only appears on click of your button.

    Maybe you can try to find an option on Elementor popup builder (sorry I don’t have the pro version) to load the modal on page load. Or contact the Elementor Support team?

    Anyway, I will work on this for the next update, I will add a javascript function to call when the map is loaded asynchronously 😉

    Have a nice day.
    Camille

    • This reply was modified 6 years, 1 month ago by Camille V.
Viewing 1 replies (of 1 total)

The topic ‘Map container not found.’ is closed to new replies.