Google Map Api - google map not showing properly after load second time -


i opening google map in bootstrap modal. when click on link open google map modal, showing well, after close modal if open google map modal second time map not showing open first time check images understand problemfirst time open google map modal

second time open google map modal without refresh page

please check first image,in pullen park(one park showing on map) showing bottom right corner when open google map modal again pullen park showing top left corner,so why pullen park not showing same first image.

it due hiding issues. might want recenter map after google.maps.event.trigger(map, 'resize');, or listen resize event following:

google.maps.event.addlistener(map, 'resize', function() {     console.log("resize triggered"); }); 

for more resize: https://developers.google.com/maps/documentation/javascript/reference

for more event: https://developers.google.com/maps/documentation/javascript/events


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -