google maps not loading fully when div in hidden

6,057 views
Skip to first unread message

padhu priya

unread,
Mar 9, 2011, 8:38:18 AM3/9/11
to google-map...@googlegroups.com
Hi,
I have worked on v2 & v3 but the same problem for me..Can u plz let me know about this..
google maps not loading fully when div in hidden.
Its Displaying only half when its loading...

Chad Killingsworth

unread,
Mar 9, 2011, 8:46:00 AM3/9/11
to google-map...@googlegroups.com
You need to trigger the resize event on the map after the div is shown. See http://code.google.com/apis/maps/documentation/javascript/reference.html#Map

Chad Killingsworth

padhu priya

unread,
Mar 9, 2011, 8:51:46 AM3/9/11
to google-map...@googlegroups.com
Hi  Chad,

I have used that
    map = new google.maps.Map(document.getElementById("map_canvas"),mapOptions);
google.maps.event.trigger(map, 'resize');
but same problem..
I cant get the full map...:-(

kilkul

unread,
Mar 9, 2011, 12:47:21 PM3/9/11
to Google Maps JavaScript API v3
Not like that! :-)

Use something like

var center = map.getCenter();
google.maps.event.trigger(map, 'resize');
map.setCenter(center);

(once the map's container is visible).

Chad Killingsworth

unread,
Mar 9, 2011, 12:53:14 PM3/9/11
to google-map...@googlegroups.com
If you need more help, you'll need to post a link to your site per the posting guidelines.

Chad Killingsworth

padhu priya

unread,
Mar 10, 2011, 1:23:16 AM3/10/11
to Google Maps JavaScript API v3
Hi...

Thanq Soo Much..It Worked out gr8..
Thanqqqq.. :-):-)
Reply all
Reply to author
Forward
0 new messages