0

I have troubles with a map inside a tab panel. This is what I show: http://www.pixelfarm.it/gmaps.png If I resize the browser window all goes ok. How can I solve this? Thanks in advance

Fabio Garzoli
  • 11
  • 1
  • 2

2 Answers2

0

You need to trigger resize function whenever user click on map's tab... Here is a basic code...it might help you

$(document).ready(function(){
  $('#maptab').bind('onClick', function() {
    google.maps.event.trigger(map, 'resize');
  });
});
Ankush Jain
  • 1,532
  • 1
  • 15
  • 24
0

What I did was create a function JavaScript:

function resize() {
                google.maps.event.trigger(map, 'resize');
}

and then the TabContainer you add the property:

OnClientActiveTabChanged="resize
     <asp:TabContainer ID="tcEntidades" runat="server" ActiveTabIndex="0"   OnClientActiveTabChanged="resize">
Flexo
  • 87,323
  • 22
  • 191
  • 272