Change automatic zoom.

This commit is contained in:
Chteufleur 2018-08-18 22:23:26 +02:00
parent 458c1e215e
commit aad1918706
1 changed files with 7 additions and 5 deletions

View File

@ -329,6 +329,7 @@ public class MainActivity extends AppCompatActivity implements IOrientationConsu
if (serviceGps != null) { if (serviceGps != null) {
serviceGps.stop(); serviceGps.stop();
} }
zoomed = false;
} }
@Override @Override
@ -432,11 +433,6 @@ public class MainActivity extends AppCompatActivity implements IOrientationConsu
t = (int) t; t = (int) t;
t = t * 5; t = t * 5;
map.setMapOrientation(t); map.setMapOrientation(t);
if (!zoomed) {
IMapController mapController = map.getController();
mapController.setZoom(20.0);
zoomed = true;
}
} }
} }
@ -514,6 +510,12 @@ public class MainActivity extends AppCompatActivity implements IOrientationConsu
if (orientation >= 0) { if (orientation >= 0) {
map.setMapOrientation(orientation); map.setMapOrientation(orientation);
} }
if (!zoomed) {
IMapController mapController = map.getController();
mapController.setZoom(20.0);
zoomed = true;
}
} }
} }
} }