| Issue 6224: | Bug: Rectangle drawing on Chrome | |
| 5 people starred this issue and may be notified of changes. | Back to list |
Drawing a rectangle using the DrawingManager no longer works on Chrome. To reproduce the problem: Click on the rectangle icon and try to draw one before you click/try any other shape. https://google-developers.appspot.com/maps/documentation/javascript/examples/full/drawing-tools
Jan 9, 2014
#1
[email protected]
Status:
NeedsMoreInfo
Jan 9, 2014
I tried on 3 different computers, all windows. All 3 worked with FF. I didn't try it on IE. The rectangle is not visible as you're drawing it. 1st rect appears as you finish drawing another one. Kind of strange. Windows XP Pro or Windows 2008 R2 Chrome Version 32.0.1700.72 m
Jan 9, 2014
Thanks. I'm able to see it on a Windows 7 machine as well. It looks like this may be due to some changes to Chrome on Windows in version 32, but we'll investigate.
Status:
Confirmed
Labels: Internal-12476374
Jan 15, 2014
This problem occurs not only on rectangle drawing but polygons and polylines too.
Jan 20, 2014
I am facing same issue. It works in FF and IE but not in chrome.
Jan 20, 2014
Also it is not working new version 32.0.1700.76 m and its working in other system where the chrome version is Version 31.0.1650.63 m.
Jan 21, 2014
A workaround for this issue is to force a repaint on the first drawing interaction with the map. You can do so, for example, by adding a DOM click listener to the element containing the map (events of the google.maps.Map instance seem to be swallowed by the DrawingManager) and force the repaint as described in http://stackoverflow.com/questions/3485365/how-can-i-force-webkit-to-redraw-repaint-to-propagate-style-changes. Example (W3C DOM): mapContainer.addEventListener("click", function(event) { var target = event.target; target.style.display = "none"; target.offsetHeight; // triggers reflow and, therefore, repaint target.style.display = "block"; });
Jan 21, 2014
That workaround would need to attach a mousemove event to properly draw the shape as the cursor moves.
Jan 21, 2014
I don't know if you or others have tested the workaround I described and please let me know if it doesn't work, but for us it does the job fine on Chrome 32.0.1700.76 m until now. For what I can tell, it seems that the repaint only needs to be triggered once when you start drawing your first shape.
Jan 27, 2014
The latest Chrome (32.0.1700.102 m) seems to fix the problem.
Jan 30, 2014
I have the latest Chrome (32.0.1700.102 m) and still, when I try to draw a polygon, I cannot see the lines until I change the zoom. It only happens when the zoom level 7 and higher.
Feb 24, 2014
This was fixed for the DrawingManager in particular in v3, but there may have been some lingering issues with overlay geometry due to the underlying bug in Chrome. This has now been fixed in Chrome 33, which is the current stable release for everyone. The Chrome bug has more details if you're interested: https://code.google.com/p/chromium/issues/detail?id=336676
Status:
Fixed
|
|
| ► Sign in to add a comment |