Reply To: Bootstrap tabs + MapPress, trigger resize?

Home Forums MapPress Support Bootstrap tabs + MapPress, trigger resize? Reply To: Bootstrap tabs + MapPress, trigger resize?

#11794
Chris
Keymaster

Hi,

You should be able to use either of the snippets below.  The only difference is the MapPress function re-centers the map after resizing it.

You can remove the ‘alert’ line once it seems to be working:

$(‘#showMap’).on(‘shown’,function(event){
alert (“resizing”);
mapp0.resize();
});

Or:

$(‘#showMap’).on(‘shown’,function(event){
alert (“resizing”);
google.maps.event.trigger(mapp0.getMap(),‘resize’);
});

I hope that helps!