Reply To: Add map shortcode to a template's tabbed content … not working

Home Forums MapPress Support Add map shortcode to a template's tabbed content … not working Reply To: Add map shortcode to a template's tabbed content … not working

#12462
Chris
Keymaster

Hi,

There is no solution or fix other than the workarounds outlined in the FAQ.

The browser reports hidden fields as having zero size, and the Maps API then draws only a small corner of the map.  Google’s solution has been to offer a resize event you can trigger when a tab becomes visible.

I would suggest using jQuery UI tabs, or a plugin based on that library, in which case I have a workaround built in to MapPress that should work to trigger the resize event.

To instead continue using the existing tab control, you’ll need to trigger the map’s resize() method when its containing tab becomes visible.  The ‘tab selected’ event depends on the control (and some don’t make one available at all).