Title: Map container not found.
Last modified: April 1, 2020

---

# Map container not found.

 *  Resolved [fvenuto](https://wordpress.org/support/users/fvenuto/)
 * (@fvenuto)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/map-container-not-found/)
 * 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](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fmap-container-not-found%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Plugin Author [Camille V](https://wordpress.org/support/users/socrapop/)
 * (@socrapop)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/map-container-not-found/#post-12612337)
 * 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](https://wordpress.org/support/users/socrapop/).

Viewing 1 replies (of 1 total)

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

 * ![](https://ps.w.org/travelers-map/assets/icon-256x256.jpg?rev=2100131)
 * [Travelers' Map](https://wordpress.org/plugins/travelers-map/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/travelers-map/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/travelers-map/)
 * [Active Topics](https://wordpress.org/support/plugin/travelers-map/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/travelers-map/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/travelers-map/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Camille V](https://wordpress.org/support/users/socrapop/)
 * Last activity: [6 years, 1 month ago](https://wordpress.org/support/topic/map-container-not-found/#post-12612337)
 * Status: resolved