Bug in Chrome or V3 Google Maps API? Calling setMap causes a white screen flash in a *new* tab in Chrome

326 views
Skip to first unread message

Sanjay Mavinkurve

unread,
Nov 5, 2011, 7:04:11 PM11/5/11
to google-map...@googlegroups.com
Bug in Chrome or V3 Google Maps API? Calling setMap causes a white screen flash in a *new* tab in Chrome

To see the code that shows the bug:


The above links must be opened in a brand new tab. After opening you cannot refresh. It has to be the first load in a new tab in Chrome.

When you click the link which calls setMap(map) on a marker, the entire screen flashes. If you refresh the page in the same tab and press the link again, you will not see the flash.

Anyone know what's going on?

Enoch Lau (Google Employee)

unread,
Nov 5, 2011, 10:46:03 PM11/5/11
to google-map...@googlegroups.com
Which OS are you using?

Enoch

Sanjay Mavinkurve

unread,
Nov 6, 2011, 1:48:17 AM11/6/11
to google-map...@googlegroups.com
I am using Chrome 15.0.874.106 m on Windows 7 HP SP 1.

Many of my friends are able to reproduce this error. The error doesn't happen on Chrome in Linux or Mac. It doesn't happen on Firefox.

Also, you have to manually cut-and-paste the URL into a brand new tab. Clicking the above link won't show the error. You actually have to do a CTRL + C and CTRL + V in a brand new tab.

Are you able to reproduce the error?

Michael Geary

unread,
Nov 6, 2011, 1:10:18 AM11/6/11
to google-map...@googlegroups.com
I can verify the problem on Chrome 16.0.912.21 beta-m running on Windows 7 x64. It's a strange one!

I do notice that you're missing a "var map" - but adding it doesn't help. I also tried one of those all-purpose hacks: wrapping the marker.setMap(map) call inside a setTimeout - but even with a long timeout that didn't help either - I still see the white flash.

-Mike

--
You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-maps-js-api-v3/-/i75aTd2BQ_QJ.

To post to this group, send email to google-map...@googlegroups.com.
To unsubscribe from this group, send email to google-maps-js-a...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.

pbuckner

unread,
Nov 7, 2011, 12:46:48 PM11/7/11
to Google Maps JavaScript API v3
On Chrome Mac, I'm looping doing animated overlays by doing something
like
... newOverlay.setMap(map);
... prevOverlay.setMap(null);
prevOverlay = newOverlay;

I'm not seeing white flash, but I do see that it takes nearly a second
for the newOverlay.setMap(map) to "work", and the result is that the
previousOverlay is removed first which results in very choppy
animation (i.e., "image1", blank, "image2", blank,...)

No problem with firefox or safari... If I delay removing prevOverlay
using setTimeout(..., 800) it give appearance of smooth updates, but
what happened to Overlay.setMap(map) which is causing it to fail to
update?

pbuckner

unread,
Nov 7, 2011, 3:35:47 PM11/7/11
to Google Maps JavaScript API v3
I'm seeing a Chrome regression with my delay issue (worked in Chrome
14), but unfortunately, cannot verify your flashing issue: Looks like
they're not related. Sorry -- I'll start a new thread.

Enoch Lau (Google Employee)

unread,
Nov 10, 2011, 10:32:21 AM11/10/11
to google-map...@googlegroups.com
Thanks for the detailed instructions - I can reproduce the error. My gut reaction is that this is due to changes to hardware acceleration in Chrome 15 on Windows, but we'll definitely take a look.

Enoch
Reply all
Reply to author
Forward
0 new messages