Thursday, September 03, 2009

ASP.Net AJAX problems - Gray Google Maps

While adding some google map functionality to a custom nopcommerce build I came across some "gray map of death" problems with the gmaps. Basically the maps seemed to be offline - they didn't draw properly and they didn't respond correctly to mouse events (double click or drag).

Searching, I found a few references to these sorts of problems - most of which seemed to be caused by css issues (float:left seemed to be a common cause).

However, eventually this thread showed me the way forwards - http://www.reimers.dk/forums/thread/1251.aspx.

Basically, the initialisation of my AJAX tabs was causing the google map to lose its positional information - so to reset it I needed to call map.checkResize() - which seemed to cure the problem :)

1 comment:

  1. I have the same issue here in my ajax update panel google map disappears, so where shall I use this map.checkResize() and your help will be much appreciated.

    ReplyDelete