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

#12492
Chris
Keymaster

Hi Nick,

By default mapp0, mapp1, …etc indicate the first map on the screen, second, and so on.  You can use the ‘name’ parameter in the shortcode to name your maps something else.

You’ll need to call that resize() function for each map inside the tab.

If you want to future-proof it, you could try searching for class ‘mapp-canvas’.  Any <div> with that class will have as its ID the name of its corresponding map object.  For example this should resize all maps on the screen:

jQuery(‘.mapp-canvas’).each(function() {
var id = jQuery(this).attr(‘id’);
var map = window[id];
map.resize();
}