CyberRobot
CyberRobot

Reputation: 744

Redraw google maps on parent container resize

I've got a google map api v3 on a page and when enlarged to full window size it doesn't redraw itself. You can see the problem here

I've looked at what people say in similar questions and I found that everyone seems to be solving this problem with this line of code.

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

I've tried it, but it didn't seem to help. Your feedback is much appreciated.

Upvotes: 5

Views: 9738

Answers (1)

reverse_engineer
reverse_engineer

Reputation: 4269

Seems to work for me... (see here)

Basically, just adding google.maps.event.trigger(map, 'resize'); doesn't help, you call it on the map object you instantiated...

Upvotes: 10

Related Questions