claymore07
Forum Replies Created
-
I’ve got this code working on console, and should be add to template custom js file. “map4” is my map id and “#pum-5425” is my popup id, so they should be different for others.
tanx alot for your help. best regardsjQuery('#pum-5425').on('pumAfterOpen', function () { if(typeof google !== 'undefined' && typeof map4 !== 'undefined'){ // Make sure Google Maps API is loaded and WP Google Maps has been initiated google.maps.event.trigger(map4,'resize'); // Update Google Map Size } });@kzeni @danieliser
I’ve got this code working on console, and should be add to template custom js file.
tanx alot for your help. best regardsjQuery('#pum-5425').on('pumAfterOpen', function () { if(typeof google !== 'undefined' && typeof map4 !== 'undefined'){ // Make sure Google Maps API is loaded and WP Google Maps has been initiated google.maps.event.trigger(map4,'resize'); // Update Google Map Size } });- This reply was modified 9 years, 2 months ago by claymore07.
@kzeni
Thank you for your answer, I’m new to WP. in your example code you have MYMAP, I can’t find a name for my map, please help me, I’m desperate.
@danieliser
Thank you so much it is greate help. where should i add this code? in the main page or popup page or in js file?After trying so many times to show my google maps on popup window in popup maker plugin in WordPress, I found out that the map should be resized again after loading in a popup, now I don’t know where to add the resize or re-init the map! the page I’m working on is this page. this is my plugin’s map.js file. where and how I should add resize or re-init functionality?