MapTileLayer - formatting & use of ternary op.

There were formatting errors and beside this I unified usage of ternary operators in simple getters.
This commit is contained in:
Vladimír Domes 2015-11-12 19:41:20 +01:00
parent f52eb07120
commit 1f2767d662

View file

@ -23,7 +23,6 @@ import android.widget.Toast;
public class MapTileLayer extends BaseMapLayer { public class MapTileLayer extends BaseMapLayer {
protected static final int emptyTileDivisor = 16; protected static final int emptyTileDivisor = 16;
public static final int OVERZOOM_IN = 2; public static final int OVERZOOM_IN = 2;
@ -237,7 +236,6 @@ public class MapTileLayer extends BaseMapLayer {
if (bmp != null) { if (bmp != null) {
oneTileShown = true; oneTileShown = true;
} }
} }
} }
@ -256,20 +254,12 @@ public class MapTileLayer extends BaseMapLayer {
@Override @Override
public int getMaximumShownMapZoom() { public int getMaximumShownMapZoom() {
if(map == null){ return map == null ? 20 : map.getMaximumZoomSupported() + OVERZOOM_IN;
return 20;
} else {
return map.getMaximumZoomSupported() + OVERZOOM_IN;
}
} }
@Override @Override
public int getMinimumShownMapZoom() { public int getMinimumShownMapZoom() {
if(map == null){ return map == null ? 1 : map.getMinimumZoomSupported();
return 1;
} else {
return map.getMinimumZoomSupported();
}
} }
@Override @Override
@ -289,5 +279,4 @@ public class MapTileLayer extends BaseMapLayer {
return map; return map;
} }
} }