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 problem
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
Post a Comment