Set screen view detached
This commit is contained in:
parent
c914e18fc1
commit
d62a92b5e8
3 changed files with 9 additions and 9 deletions
|
@ -232,7 +232,7 @@ public class MapViewTrackingUtilities implements OsmAndLocationListener, IMapLoc
|
|||
switchToRoutePlanningMode();
|
||||
}
|
||||
// When location is changed we need to refresh map in order to show movement!
|
||||
if (!mapView.isServerRendering()){
|
||||
if (!mapView.isScreenViewDetached()){
|
||||
mapView.refreshMap();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ public class OsmAndHttpServer extends NanoHTTPD {
|
|||
|
||||
@Override
|
||||
public void stop() {
|
||||
mapActivity.getMapView().setServerRendering(false);
|
||||
mapActivity.getMapView().setScreenViewDetached(false);
|
||||
super.stop();
|
||||
}
|
||||
|
||||
|
@ -46,7 +46,7 @@ public class OsmAndHttpServer extends NanoHTTPD {
|
|||
this.mapActivity = mapActivity;
|
||||
registerEndpoints();
|
||||
start(NanoHTTPD.SOCKET_READ_TIMEOUT, false);
|
||||
mapActivity.getMapView().setServerRendering(true);
|
||||
mapActivity.getMapView().setScreenViewDetached(true);
|
||||
}
|
||||
|
||||
public String getUrl() {
|
||||
|
|
|
@ -77,7 +77,7 @@ public class OsmandMapTileView implements IMapDownloaderCallback {
|
|||
protected OsmandSettings settings = null;
|
||||
private CanvasColors canvasColors = null;
|
||||
private Boolean nightMode = null;
|
||||
private boolean isServerRendering = false;
|
||||
private boolean isScreenViewDetached = false;
|
||||
|
||||
private class CanvasColors {
|
||||
int colorDay = MAP_DEFAULT_COLOR;
|
||||
|
@ -284,12 +284,12 @@ public class OsmandMapTileView implements IMapDownloaderCallback {
|
|||
return layers.contains(layer);
|
||||
}
|
||||
|
||||
public boolean isServerRendering() {
|
||||
return isServerRendering;
|
||||
public boolean isScreenViewDetached() {
|
||||
return isScreenViewDetached;
|
||||
}
|
||||
|
||||
public void setServerRendering(boolean serverRendering) {
|
||||
isServerRendering = serverRendering;
|
||||
public void setScreenViewDetached(boolean screenViewDetached) {
|
||||
isScreenViewDetached = screenViewDetached;
|
||||
}
|
||||
|
||||
public float getZorder(OsmandMapLayer layer) {
|
||||
|
@ -654,7 +654,7 @@ public class OsmandMapTileView implements IMapDownloaderCallback {
|
|||
final int cx = (int) (ratiox * view.getWidth());
|
||||
if ((currentViewport.getPixWidth() != view.getWidth() || currentViewport.getPixHeight() != view.getHeight() ||
|
||||
currentViewport.getCenterPixelY() != cy ||
|
||||
currentViewport.getCenterPixelX() != cx) && !isServerRendering) {
|
||||
currentViewport.getCenterPixelX() != cx) && !isScreenViewDetached) {
|
||||
currentViewport.setPixelDimensions(view.getWidth(), view.getHeight(), ratiox, ratioy);
|
||||
refreshBufferImage(drawSettings);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue