branflake2267 / GWT-Maps-V3-Api

GWT Maps V3 Javascript Bindings
Other
144 stars 113 forks source link

Map widget failing to load correctly #186

Closed magneto1 closed 11 years ago

magneto1 commented 11 years ago

Hi I have made a map widget using gwt and have noticed some vary strange behavior. Sometime the map will load correctly and sometimes it will only half load. it loads a small area in the top left corner and then just leaves the rest of the map gray. When i press "ctrl +" the map will finish loading and work fine. Before anyone asks its not a problem with my internet connection or browser as i have checked and i commented out and extra code i put in so all it should be doing is loading the road map. Has anyone else had this problem or know what might be causing it?

image

mgmmmm commented 11 years ago

I believe this is the same issue as I had previously. Here is the stream and a possible fix (add a call to mapwidget.triggerResize after adding the map): https://github.com/branflake2267/GWT-Maps-V3-Api/issues/172

magneto1 commented 11 years ago

The problem was happening because i was setting the map widget to be invisible at the start and when it is set to visible it had the affect shown above. The call to mapwidget.triggerResize after I made the map visible solved the problem and works like a treat. Thanks for the help.