• Hello, very nice plug-in by the way … I’ve got a bug (it is not the plugins fault) its a known bug with maps when placed into jquery hide and show .. the map displays only half size .. the fix is to place “google.maps.event.trigger( map, ‘resize’ );” code in jquery like this ex: $(‘div.map-box’).show();
    google.maps.event.trigger(map, ‘resize’);
    });

    so my question is how can I include this code with the plugin .. what would replace the name “map” in (map, ‘resize’); ?

    thanks .

    https://wordpress.org/plugins/easy2map/

Viewing 1 replies (of 1 total)
  • Plugin Author stevenellis

    (@stevenellis)

    Hi,

    Thanks for raising this issue. To fix it would require a bit of work in easy2map.js (found in the scripts folder in the plugin directory).
    On line 353, each map (there my be more than one on a page) is instantiated as follows:

    map = new google.maps.Map(document.getElementById(mapControl), mapOptions);

    The map variable is however local to the function, so it is not possible to refer to it after it’s been created.
    The best would be to instantiate a global array that stores all map objects created, and then make a method that calls the google.maps.event.trigger(map, ‘resize’) method for each map.
    Email me at steven@mydoorhandle.com, and I can send you the changes required.

    My best,
    Steven

Viewing 1 replies (of 1 total)
  • The topic ‘Map resize on jquery hide and show’ is closed to new replies.