Reputation: 59555
How to disable all effects and animations in google api v3? Is there some equivalent of jQuery.fx.off
? If google api used some base library like jquery that would be easy... but this is probably not the case. I just want to disable them ALL. For example:
Or, if disabling them all is not possible, how to disable the particular effects listed above?
It is needed for running it in IE6 which is very slow (note that google api v3 seems to work in this browser), also desirable for other IE versions on slower computers.
Upvotes: 2
Views: 3100
Reputation: 77
By happenstance I needed to slightly pan my map to have all the markers show up. Besides fixing that problem, the map stopped animating on the various zooms. The effect is not exactly what one might want (the map goes blank, then the markers zoom to their spots, then the map with its new extents shows up), but it's better for what I need, and maybe it's better for you. Here's the bottom of my function that puts markers on the map:
map.fitBounds(latlngbounds);
//This minimum zoom trick I got from StackOverflow:
google.maps.event.addListenerOnce(map, 'bounds_changed', function(event){
if (this.getZoom() >= 5){
this.setZoom(5)
}
});
map.panBy(1,0);
Upvotes: 0
Reputation: 12983
There's no general "turn everything off" facility. You need to select what you want to turn off and do each individually, if that's actually possible...
You can't disable animated zoom. This is the subject of a long-standing enhancement request which has been marked WontFix.
There's no option to disable layer-switch fade. I don't think there's an enhancement request, either.
Panning for InfoWindows is controlled by the disableAutoPan
option for each InfoWindow. You can set that option individually with InfoWindow.setOptions()
.
IE6 is not a supported browser for Version 3. If it works, it's a bonus.
Upvotes: 5