yugalatea / gwt-google-apis

Automatically exported from code.google.com/p/gwt-google-apis
0 stars 0 forks source link

Calling MapWidget.setCenter() inside MapWidget.checkResize() can cause problems when a zoom is in progress #216

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Found in Release:
gwt-maps 1.0.1

Detailed description:
Reported by: wh1337
Summarized from : Maps API Issue Tracker
http://code.google.com/p/gmaps-api-issues/issues/detail?id=833

The user has a Timer which callse MapWidget.checkResize() 5 times a second.
 When a zoom is in progress, sometimes the map API simply "stops working."

The problem was tracked down to the additional 'setCenter()' call inside of
the checkResize() wrapper.

Workaround if you have one:
1) Don't call MapWidget.checkResize() so frequently, or during a zoom.
2) Use MapWidget.getPeer() to get the GMap2 JavaScriptObject and use a JSNI
method to call the raw checkResize() method which will not include a
setCenter() call.

Links to the relevant GWT Developer Forum posts:

Original issue reported on code.google.com by galgwt.reviews@gmail.com on 22 Nov 2008 at 1:20

GoogleCodeExporter commented 9 years ago

Proposed patch at

http://galgwt-reviews.appspot.com/808

This patch removes the setCenter() from checkResize(), but then adds a second 
method
checkResizeAndSetCenter().  Hopefully, if someone was depending on the old 
behavior
they'll quickly find the new method.

Original comment by galgwt.reviews@gmail.com on 22 Nov 2008 at 1:27

GoogleCodeExporter commented 9 years ago
Review by mmendez. Committed as r1033,1034.

Original comment by galgwt.reviews@gmail.com on 24 Nov 2008 at 4:44

GoogleCodeExporter commented 9 years ago

Original comment by galgwt.reviews@gmail.com on 11 Dec 2008 at 3:08

GoogleCodeExporter commented 9 years ago
Updating account names

Original comment by zundel@google.com on 21 Dec 2009 at 2:00