I am converting my old code from v2 to v3 and noticed that the map is now significantly slower when I drag it. This only happens with Firefox while there is no issue under Google Chrome. This is not caused by my code as this problem exists even in the simplest maps, such as Google's basic example.
Interestingly enough, there is no performance issue under any browser when I visit maps.google.com. The only difference with the basic example seems to be that in the basic example, new tiles appear with a fade in transition effect. Because of that, I suspect that the fade in effect is the culprit. Does anybody know if I can disable it somehow? Are there any other ideas?
Note: I have tested this with the latest versions of Firefox & Chrome under Windows & Linux, on different computers and different API versions v3.exp
, v3.13
. Code is available at Google's basic example, but follows an even simpler working copy of it.
<!DOCTYPE html>
<html>
<head>
<style>
html, body, #map-canvas { height: 100%; }
</style>
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"></script>
<script>
var map;
function initialize() {
map = new google.maps.Map(document.getElementById('map-canvas'),
{zoom: 8, center: new google.maps.LatLng(-34.397, 150.644)});
}
google.maps.event.addDomListener(window, 'load', initialize);
</script>
</head>
<body>
<div id="map-canvas"></div>
</body>
</html>
Update:
I never had to take screencasts before so I probably didn't used the best tools, anyway even with these pixelated videos the difference should be obvious. In Firefox the render of new tiles and the panning is laggy (this is not the case when using maps.google.com so it's not an issue of Chrome being "better" than Firefox).
- Chrome: http://tinypic.com/r/zwepsp/5
- Firefox: http://tinypic.com/r/263wytt/5