fix old hysteresis bug

This commit is contained in:
sonora 2012-03-13 20:35:17 +01:00
parent df3786a670
commit fa884b13c9

View file

@ -713,7 +713,7 @@ public class MapActivity extends TrackedActivity implements IMapLocationListener
if(mapView.getZoom() != z && !mapView.mapIsAnimating()){
long now = System.currentTimeMillis();
// prevent ui hysteresis (check time interval for autozoom)
if((lastTimeAutoZooming - now) > 6500){
if(Math.abs(mapView.getZoom() - z) > 1 || (now - lastTimeAutoZooming) > 6500){
lastTimeAutoZooming = now;
mapView.setZoom(z);
}