I'm using the Google Maps API v3 for javascript. On certain cases I only see the map on the upper left corner. To see, please try going to http://telofast.com/telofun/#stationRanking and then pressing on one of the many lines.
The map works when the browser is resized as the width and height are correctly set and the resize event is raised.
The quickest solution to your problem would be to call the resize method (below) after the javascript which reveals it. Maybe after showDiv('mapDiv');
in showScoresAndCenterOn
?
google.maps.event.trigger(map, 'resize');
To fix this you need to
Resize the map
google.maps.event.trigger(map, 'resize');
Recenter the map, where myCenter
is your lat, lng point.
map.setCenter(myCenter);
It's a bit of a hack but it works.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With