Yes, you can turn off smooth scaling! But with some ... changes. In V2, you can simply "disableContinuousZoom ()" and solve the problem, but in this new version, the Google guys did not implement it.
This is the first opportunity (and worst in my opinion ..):
* {
-webkit-transition-property: none!important;
transition-property: none!important;
-webkit-animation: none!important;
animation: none!important;
}
(this solution is from: http://code.google.com/p/gmaps-api-issues/issues/detail?id=3033&q=continuous%20zoom&colspec=ID%20Type%20Status%20Introduced%20Fixed%20Summary%20Stars%20ApiType % 20Internal )
Another solution, and I think the best that was implemented in OpenLayers:
setMapObjectCenter: function(center, zoom) {
if (this.animationEnabled === false && zoom != this.mapObject.zoom) {
var mapContainer = this.getMapContainer();
google.maps.event.addListenerOnce(
this.mapObject,
"idle",
function() {
mapContainer.style.visibility = "";
}
);
mapContainer.style.visibility = "hidden";
}
this.mapObject.setOptions({
center: center,
zoom: zoom
});
},
This is rather strange because you use a Container map with styles, but depending on your case, maybe the best solution is this!
source
share