Is there a way of preventing a Google Maps (JS, v3) map being displayed from the get-go? I\'m doing some pre-processing and would like to show my \'Loading\' spinner until e
This will work
google.maps.event.addListener(map, "idle", function ()
{
google.maps.event.trigger(map, 'resize');
});
another way to show the hidden map when map is first time rendering the <div>
is to set style: visibility.
When firstly hidden, use visibility = hidden
; to show use visibility = visible
the reason is: visibility:hidden means that the contents of the element will be invisible, but the element stays in its original position and size.