[GIS] OpenLayers – Vector Layer and Google Maps – vector layer and google layers don’t seem to be in sync when zooming on Chrome

browsergoogle mapsopenlayers-2vector

I am working with a Google Layer and a vector layer in OpenLayers. I was wondering if anyone else noticed any problems with Chrome displaying Google Maps layers on OpenLayers? It seems that when I zoom, it is much slower than doing Google Maps by itself (say, at the google maps site). And when I zoom with a Vector Layer that has features, they don't zoom in sync with the google map. It seems like I zoom, and the vector layer will get more zoomed in much faster than the Google maps layer. I tried it in firefox and it seems to work much much better (still notice it if you zoom in super super fast, but it is barely noticable). I also noticed that the google layers have some kind of strange space between the tiles, like a 1px split between each map tile.

For example this code will do it:

http://openlayers.org/dev/examples/spherical-mercator.html

But it works fine in Firefox. Does OpenLayers and Google Maps just not work well in Google Chrome?

Best Answer

Well, I managed to figure out what was going on. Google Chrome's zoom feature doesn't respond well with OpenLayers and Google Maps. I noticed that my zoom was on 110% instead of normal 100%. As soon as you switch to 110% from 100% the 1px gap between all the tiles appears! This 1px gap will appear on some of the zoom levels. Also, the map responds more slowly at any zoom level other than 100%.

I even went to Google Maps (without OpenLayers) and the problem appears there too! The 1px gap between tiles is there. The speed doesn't take as big a hit as it would with OpenLayers, but it is still noticable.

Related Question