slightly change auto zoom

git-svn-id: https://osmand.googlecode.com/svn/trunk@778 e29c36b1-1cfa-d876-8d93-3434fc2bb7b8
This commit is contained in:
Victor Shcherb 2010-12-07 13:41:10 +00:00
parent e252d9c3c8
commit 0a11c3a98a

View file

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