| Issue 1219: | Resize map causes javascript error messages on switch between map types | |
| 3 people starred this issue and may be notified of changes. | Back to list |
Sign in to add a comment
|
What steps will reproduce the problem? Please provide a link to a demonstration page if at all possible, or attach code. 1. http://www.kclsoftware.com/googlemaps/resizebug.html 2. resize the browser window 3. change the map type. (i.e. satellite or hybrid) What version of the API are you using? 2.150 and 2.151e exhibit the issue, 2.149 does not. What operating system and browser are you using? It is a problem with IE 7/8 and FF 3 using firebug with break on all errors. FF is Windows and Linux |
||||||||||||||
,
Apr 12, 2009
Only a problem when GMapUIOptions.controls.menumaptypecontrol is set. Using MapUIOptions.controls.maptypecontrol works. |
|||||||||||||||
,
Apr 12, 2009
Does the problem also occur if you get rid of the default UI, and just add a MenuMapTypeControl to the map by itself? |
|||||||||||||||
,
Apr 12, 2009
Apparently it's only a problem if added through GMapUIOptions: http://www.kclsoftware.com/googlemaps/resizebug2.html |
|||||||||||||||
,
Apr 15, 2009
Your 'bug' only happens when the height of the browser window is resized, not when the width of the brwoser window is resized. I'm talking of this example page http://www.kclsoftware.com/googlemaps/resizebug.html I looked only very quickly over your script and I think there could be an error in your css or in your script. Try to put an alert after you define st.height: st.height = win_size.height; alert(st.height); You will get an empty alert in every case. But I didn't look deeper, so I cannot tell you the reason. |
|||||||||||||||
,
Apr 15, 2009
When the width of the window is resized, the size of the map does not change. In fact in current version of the page that the given stripped down version is based on, I explicitly set st.height to empty string so that the MapSearchResultsSide class takes over with height: 100%. Also the ONLY difference between http://www.kclsoftware.com/googlemaps/resizebug.html and http://www.kclsoftware.com/googlemaps/resizebug2.html is how the map type control is added: # diff -u resizebug.html resizebug2.html --- resizebug.html 2009-04-15 20:34:02.000000000 -0600 +++ resizebug2.html 2009-04-15 20:33:49.000000000 -0600 @@ -52,7 +52,15 @@ map = new google.maps.Map2(document.getElementById("map_canvas")); var default_center = [59.888937,-101.601562]; map.setCenter(new google.maps.LatLng(default_center[0],default_center[1]), 2); - map.setUIToDefault(); + + var customUI = map.getDefaultUI(); + customUI.maptypes.physical = false; + customUI.controls.menumaptypecontrol = false; + customUI.controls.maptypecontrol = false; + map.setUI(customUI); + map.addControl(new google.maps.MenuMapTypeControl()); + + //map.setUIToDefault(); register_resize_event(); } else { |
|||||||||||||||
,
Apr 15, 2009
Yes, you are right. The bug is also reproducible in a very simple page when the width and/or height of the map is defined in percents. After resizing the browser in any direction you even get the error when you click on the map. http://mxamples.googlepages.com/resize.html Addition: The bug only seems to happen when the map is small enough so that setUIToDefault() will be built as MenuMapTypeControl(). |
|||||||||||||||
,
Apr 16, 2009
As I said in http://code.google.com/p/gmaps-api-issues/issues/detail?id=1219#c1 it also occurs when you use setUI(customUI) where customUI.controls.menumaptypecontrol is true. If MenuMapTypeControl is manually added. There is no error. |
|||||||||||||||
,
Apr 18, 2009
Thanks, I've reported it to the team.
Status: Accepted
Labels: Internal-1798761 |
|||||||||||||||
,
May 24, 2009
Changing status of "Accepted" issues to "Acknowledged", to clarify their state. We may not be able to resolve all bugs or fulfill all feature requests, but we do thank you for filing them, and we will continually revisit all acknowledged issues and evaluate their feasibility. Thanks!
Status: Acknowledged
|
|||||||||||||||
,
May 30, 2009
There was some confusion with the change from the "Accepted" status to the "Acknowledged" status, and some developers took that to mean that their bug was being downgraded. This was only a wording change, not a priority change. We are still working on fixing many bugs (particularly the regression bugs), so a fix for your bug may still be coming in the future. After a discussion in the forum, we will now use "Confirmed" instead of "Acknowledged". This status indicates that we have verified the bug, reported it internally, and it is included in the list of bugs that we review each week (when determining what to fix next).
Status: Confirmed
|
|||||||||||||||
,
Jun 22, 2009
(No comment was entered for this change.)
Status: FixedNotReleased
|
|||||||||||||||
,
Jul 02, 2009
(No comment was entered for this change.)
Labels: Fixed-2.165
|
|||||||||||||||
,
Jul 02, 2009
(No comment was entered for this change.)
Status: Fixed
|
|||||||||||||||
|
|
|||||||||||||||