I’m using Google map API to display map in simple javascript popup. While popup opens it will display as below:
Map Preview in Javascript Popup http://122.170.97.189:81/gmap/preview.png
I tried auto refresh div using Jquery for map div like:
$(‘#map’).fadeOut(‘slow’).load().fadeIn(“fast”);
It refresh the map div but still the problem is not solved.
If I press F12 in chrome and firefox the map is displaying correctly.
I’m using Google map API to display map in simple javascript popup. While popup
Share
Call the google maps code to render the map after the popup is fully loaded. You should call
google.maps.Map()inside$(document).ready()or after some timeout (setTimeout()).When map object is created it tries to figure out how big the canvas is and if popup is not fully loaded yet it may get wrong values.