Panning a map by dragging it slows down in Google Maps API v3 under Firefox

I am converting my old code from v2 to v3 and noticed that now the map is much slower when I drag it . This only happens with Firefox, while Google Chrome has no problem. This is not caused by my code, because this problem exists even in the simplest maps, for example, a basic example of Google .

Interestingly, there is no performance issue in any browser when visiting maps.google.com . The only difference from the base example is that in the base example, new tiles appear with the effect of switching to transition mode. Because of this, I suspect that the effect is disappearing . Does anyone know if I can somehow turn it off? Are there any other ideas ?

Note. I tested this with the latest versions of Firefox and Chrome under Windows and Linux on different computers and different versions of API v3.exp , v3.13 . The code is available in the main Google example, but an even simpler working copy follows.

 <!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 shoot screencasts, so I probably didn't use the best tools anyway, even with these pixelated videos, the difference should be obvious. In Firefox, rendering new fragments and panning are lags (this is not the case if you use maps.google.com, so the Chrome issue is no better than Firefox).

+6
source share
3 answers

I can’t believe that anyone else is facing this problem, and I’ve been trying to understand for more than two years.

You have no idea how many times I have published this issue and almost all the time I received some suggestions that had nothing to do with the issue.

Even I emailed some google idiots who told me it was probably a mistake and I should post it on some bla-bla-bla forum.

When I published it there, I explained the problem in detail to them and got some answer that still has nothing to do with my question.

What I noticed is that if I remove the video card drivers, it will work like a charm, and everything will be very smooth. This is the same when I connect via remote desktop.

I will be glad if anyone finds a solution.

PS On Mac OS it's a little better than Windows!

This is my original question.

Here you can see the answers on the google forum: Click

+1
source

You can try this Google help: https://support.google.com/maps/answer/18529?hl=en . Perhaps this has something to do with hardware accelerations. But if the card loads slowly, is the message displayed to the user?

0
source

If you need a workaround, try caching fragments of the map of places that you most often view (i.e. a large area of ​​your hometown).

Not sure if this goes against google's terms of use as you technically download their IP without permission. If so, you can use something like: https://code.google.com/p/ogmaps/ or https://code.google.com/p/gmapoffline/ , which are third-party interpretations of google maps and without royalties.

0
source

Source: https://habr.com/ru/post/957921/


All Articles