• Hi, I am new on wordpress i am having a problem loading leaflet plugin.
    I am using elementor.
    I wanted to load gpx files in leaflet.
    its been loading perfectly but the map isnt loading. My current working is below:
    1- I tried the short code directly into elementor and it shows code instead of map.
    2- i tried to make a section template and embed it into main page, now the map loads but with grey areas and on resizing the window, it fully loads.
    3- I tried to make a popup and trigger it through a button, the map in popup works as expected but when i close the popup and try to reopen it, it throws “Map container not found”.
    The popup thing is the closest to what i need.
    any information will be of great help.

Viewing 12 replies - 1 through 12 (of 12 total)
  • Thread Starter adamsaeed

    (@adamsaeed)

    This is the code i am using

    [leaflet-map]
    [leaflet-gpx src="/wp-content/uploads/gpx/5k nocturne.gpx"]
    [hidemarkers]
    [elevation gpx="/wp-content/uploads/gpx/5k nocturne.gpx"]
    Plugin Contributor hupe13

    (@hupe13)

    You must use a shortcode block. I don’t know Elementor, but it hat a shortcode widget: https://elementor.com/help/shortcode-widget/ also. Try using this.
    Is it a copy/paste error or is there a blank character in the gpx file url?
    Remove the blank character in the file name.

    Thread Starter adamsaeed

    (@adamsaeed)

    it is a blank character, the gpx is working fine.
    let me explore this shortcode widget.

    Plugin Contributor hupe13

    (@hupe13)

    The shortcode must be either

    [leaflet-map]
    [leaflet-gpx src="/wp-content/uploads/gpx/5k nocturne.gpx"]
    [hidemarkers]

    or

    [leaflet-map]
    [leaflet-marker lat=.... lng=...]Start[/leaflet-marker]
    [elevation gpx="/wp-content/uploads/gpx/5k nocturne.gpx"]
    Thread Starter adamsaeed

    (@adamsaeed)

    its some rendering problem. I have tried the shortcode widget but no luck.
    same greyed out smaller map, until I resize the window.

    Plugin Contributor hupe13

    (@hupe13)

    Try using

    [leaflet-map fitbounds]

    Thread Starter adamsaeed

    (@adamsaeed)

    already tried fitbounds.

    Plugin Contributor hupe13

    (@hupe13)

    Do you have a link to an example page?

    Thread Starter adamsaeed

    (@adamsaeed)

    https://kilomax.ca/duplicated-le-tour-du-cap-tourmente-simard-46/

    when you open the link you will see a map with elevation profile under it.
    it loads when the page loads, but i need to have multiple maps in the same page, and they will open when i toggle a button.
    there is a button above the map named “Click Here”, it will open the map as a popup, but when you close it it wont open again until you refresh the page.

    • This reply was modified 4 years, 11 months ago by adamsaeed.
    Plugin Contributor hupe13

    (@hupe13)

    I don’t see any map, but I see, that you are using the very old plugin WP GPX Maps. Delete this (and possible other ones that are no longer needed). Clear all caches.
    Then try it again. If it doesn’t work, create a smaller test page with only the maps.

    Thread Starter adamsaeed

    (@adamsaeed)

    but why, i have checked the link in incognito on chrome, the map is there below the button, I need to have elevation profile, can you suggest any other?

    Plugin Contributor hupe13

    (@hupe13)

    [leaflet-map]
    [leaflet-marker lat=.... lng=...]Start[/leaflet-marker]
    [elevation gpx="/wp-content/uploads/gpx/5k nocturne.gpx"]

    This is code using my plugin, you have installed it.
    https://ww.wp.xz.cn/plugins/extensions-leaflet-map

    The plugins Leaflet Map and WP GPX Maps have never functioned together on one page and WP GPX Maps no longer works at all. Thats why I wrote my plugin.

    You seems to use the SiteGround Optimizer Plugin. Please clear its cache. leaflet.js is loading two times, leaflet.min.js from the cache and leaflet.js from Leaflet Maps.

Viewing 12 replies - 1 through 12 (of 12 total)

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