Reputation: 37484
I create a map in a div with 'display: none'. With google maps v2 I could set the 'size' parameter to the size of the div once shown, but this 'size' option disappeared in v3 of the API.
How can I do that?
Upvotes: 16
Views: 37058
Reputation: 17526
Change the size of the div using any method you want, and then call google.maps.event.trigger(map, 'resize')
. A related question is here.
Upvotes: 33