Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to manually reload Google Map with JavaScript

People also ask

Does Google Maps use JavaScript?

The Maps JavaScript API is loaded using a script tag, which can be added inline in your HTML file or dynamically using a separate JavaScript file.


Yes, you can 'refresh' a Google Map like this:

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

This basically sends a signal to your map to redraw it.

Hope that helps!


You can refresh with this:

map.panBy(0, 0);