Improve startup (put 1 todo to test)
This commit is contained in:
parent
771f61c12a
commit
3d7d0123ac
3 changed files with 12 additions and 4 deletions
|
@ -232,7 +232,8 @@ public class MapActivity extends AccessibleActivity {
|
|||
openGlSetup = true;
|
||||
}
|
||||
if(event == InitEvents.MAPS_INITIALIZED) {
|
||||
mapView.refreshMap(true);
|
||||
// TODO investigate if this false cause any issues!
|
||||
mapView.refreshMap(false);
|
||||
if(dashboardOnMap != null) {
|
||||
dashboardOnMap.updateLocation(true, true, false);
|
||||
}
|
||||
|
@ -244,7 +245,7 @@ public class MapActivity extends AccessibleActivity {
|
|||
if(!openGlSetup) {
|
||||
setupOpenGLView(false);
|
||||
}
|
||||
mapView.refreshMap(true);
|
||||
mapView.refreshMap(false);
|
||||
if(dashboardOnMap != null) {
|
||||
dashboardOnMap.updateLocation(true, true, false);
|
||||
}
|
||||
|
|
|
@ -182,13 +182,16 @@ public class MapRenderRepositories {
|
|||
return false;
|
||||
}
|
||||
if (requestedBox == null) {
|
||||
log.info("RENDER MAP: update due to start");
|
||||
return true;
|
||||
}
|
||||
if (drawSettings.isUpdateVectorRendering()) {
|
||||
log.info("RENDER MAP: update due to request");
|
||||
return true;
|
||||
}
|
||||
if (requestedBox.getZoom() != box.getZoom() ||
|
||||
requestedBox.getMapDensity() != box.getMapDensity()) {
|
||||
log.info("RENDER MAP: update due zoom/map density");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -199,9 +202,14 @@ public class MapRenderRepositories {
|
|||
deltaRotate += 360;
|
||||
}
|
||||
if (Math.abs(deltaRotate) > 25) {
|
||||
log.info("RENDER MAP: update due to rotation");
|
||||
return true;
|
||||
}
|
||||
return !requestedBox.containsTileBox(box);
|
||||
boolean upd = !requestedBox.containsTileBox(box);
|
||||
if(upd) {
|
||||
log.info("RENDER MAP: update due to tile box");
|
||||
}
|
||||
return upd;
|
||||
}
|
||||
|
||||
public boolean isEmpty() {
|
||||
|
|
|
@ -865,7 +865,6 @@ public class ResourceManager {
|
|||
}
|
||||
|
||||
public void updateRendererMap(RotatedTileBox rotatedTileBox){
|
||||
log.info("RENDER MAP: force update the map");
|
||||
renderer.interruptLoadingMap();
|
||||
asyncLoadingThread.requestToLoadMap(new MapLoadRequest(rotatedTileBox));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue