Leaflet Maps Marker (Google Maps, OpenStreetMap, Bing Maps)
incomplete map when loading in a hidden layer (4 posts)

  1. chris_muc
    Posted 3 years ago #

    i want to show a map with markers when i click on a "show" button. therefore the map is loaded in a hidden div.

    but when changing the div's display to block, only the first tile of the map is loaded. when resizing the browser window the map is redrawn and all leaflet-tiles are loaded.

    is it possible to force loading all leaflet-tiles of the map via jquery?

    i am using wp 3.5. with mapsmarkers 3.4.3.


  2. RobertHarm
    Plugin Author

    Posted 3 years ago #

    the leaflet function invalidatesize() can be used for this

  3. chris_muc
    Posted 3 years ago #

    thank you for the quick reply, robert.
    i just tried


    within the document.ready function, but all i get is

    Object [object Object] has no method 'invalidateSize'

    I also tried $(window). and $(document) but altough leaflet.js is loaded the function is not found. What am i doing wrong?!

  4. RobertHarm
    Plugin Author

    Posted 3 years ago #

    sorry - dont know - took a look again - I use invalidateSize() to reload the map when container size changes (responsive design)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic


No tags yet.