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
Asked
Active
Viewed 443 times
2 Answers
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
-
i use the trigger in initialize and don't works, the map is 600x300px – Fabio Garzoli Apr 05 '13 at 18:04
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