Annoying white flashes happen when zooming in Google Map Api
Asked Answered
F

1

6

I'm currently developing a webpage containing a map based on Google Map Api V3 : http://www.fairaidsyria.org

I have two overlays containing polygons that appear successively as the user zooms in.. Unfortunately, annoying "white flashes" occur when zooming. The problem even occurs at max zoom levels, when both overlays are not displayed...

The blinking seems to be directly related to the presence of polygons in the zoomed area, because if you try to zoom somewhere else in the world (area without polygons), everything works fine : no flashes.

I suspect this phenomena to be "native" and not related to a mistake I could have done. In fact, the same flashes also happen when you zoom in the triangle in the following official example : https://developers.google.com/maps/documentation/javascript/examples/polygon-simple?hl=en

Did someone find a way to solve this?

Folger answered 13/8, 2013 at 13:38 Comment(1)
When the maps zoom in/out, the google maps refreshs the map, because it need to show a different image, according to the zoom. You can ask yourself, "why It just doesn't store in cache?". Well, I can't tell for sure, but based in my experience with maps (not only google maps), some Satellite images are released with legal rights, which means that maybe you can't, even indirectly, store those images. When I tested your map, sometimes I could see those "white flashes", but sometimes I coudn't, It depends of the region I was looking.Arvid
C
0

based on this good article change your meta viewport tag to:

<meta name="viewport" content="initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0">
Colley answered 27/1, 2018 at 8:8 Comment(1)
or you can use: content="initial-scale=1.0, user-scalable=no" in viewport meta tagColley

© 2022 - 2024 — McMap. All rights reserved.