Hi,
the pronamic google map doesn’t work correctly in tabs or accordions!? On page loading and selecting the tab which is placed the map – the map is empty. If i change the browser window size only a little bit. Then the map is showing.
Thanks & Regards
other Google Map Plugin has a fix like that:
Are you trying to display the map in Tabs or Accordions?
If you are trying to display the map in a tab or an accordion, you’ll need to modify the code to suit this (We have tried to put a universal check in for this but depending on your theme or plugin, this may not work as it should).
Please open wp-google-maps-pro/js/core.js and search for the following piece of code:
jQuery(‘body’).on(‘tabsactivate’, function(event, ui) {
for(var entry in wpgmaps_localize) {
InitMap(wpgmaps_localize[entry][‘id’],’all’,false);
}
});
Directly below that, add the following:
jQuery(‘body’).on(‘click’, ‘.the_class_name_of_your_tab_or_accordion’, function(event, ui) {
for(var entry in wpgmaps_localize) {
InitMap(wpgmaps_localize[entry][‘id’],’all’,false);
}
});
Replace the .the_class_name_of_your_tab_or_accordion with the relevant class name of the element.
Reply ↓