Redraw google maps on parent container

I have a google api v3 map on the page, and when it is enlarged to the full size of the window, it does not redraw itself. You can see the problem here.

I looked at what people are saying in similar questions, and I found that everyone seems to solve this problem with this line of code.

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

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

+5
source share
1 answer

It seems to work for me ... (see here )

Basically, just adding google.maps.event.trigger(map, 'resize'); does not help, you call it in the map object you created ...

+11
source

Source: https://habr.com/ru/post/1204401/


All Articles