This commit is contained in:
Nazar-Kutz 2020-09-17 15:26:18 +03:00
parent 7f5aa5cd33
commit 2f6ccfe6be
2 changed files with 3 additions and 7 deletions

View file

@ -149,10 +149,10 @@ public class OsmandRasterMapsPlugin extends OsmandPlugin {
underlayLayer.setMap(null); underlayLayer.setMap(null);
} }
if(settings.LAYER_TRANSPARENCY_SEEKBAR_MODE.get() == LayerTransparencySeekbarMode.UNDERLAY && if(settings.LAYER_TRANSPARENCY_SEEKBAR_MODE.get() == LayerTransparencySeekbarMode.UNDERLAY &&
underlayLayer.getMap() != null) { underlayLayer.getMap() != null || underlayLayer.getMapTileAdapter() != null) {
layers.getMapControlsLayer().showTransparencyBar(settings.MAP_TRANSPARENCY, true); layers.getMapControlsLayer().showTransparencyBar(settings.MAP_TRANSPARENCY, true);
} else if(settings.LAYER_TRANSPARENCY_SEEKBAR_MODE.get() == LayerTransparencySeekbarMode.OVERLAY && } else if(settings.LAYER_TRANSPARENCY_SEEKBAR_MODE.get() == LayerTransparencySeekbarMode.OVERLAY &&
overlayLayer.getMap() != null) { overlayLayer.getMap() != null || overlayLayer.getMapTileAdapter() != null) {
layers.getMapControlsLayer().showTransparencyBar(settings.MAP_OVERLAY_TRANSPARENCY, true); layers.getMapControlsLayer().showTransparencyBar(settings.MAP_OVERLAY_TRANSPARENCY, true);
} else { } else {
layers.getMapControlsLayer().hideTransparencyBar(); layers.getMapControlsLayer().hideTransparencyBar();

View file

@ -25,6 +25,7 @@ public class YandexTrafficAdapter extends MapTileAdapter {
private final static Log log = PlatformUtil.getLog(MapTileLayer.class); private final static Log log = PlatformUtil.getLog(MapTileLayer.class);
private final static String YANDEX_PREFFIX = ".YandexTraffic_"; private final static String YANDEX_PREFFIX = ".YandexTraffic_";
private final static String YANDEX_BASE_URL = "https://core-jams-rdr.maps.yandex.net";
private static final long DELTA = 10 * 60 * 1000; private static final long DELTA = 10 * 60 * 1000;
private long lastTimestampUpdated; private long lastTimestampUpdated;
@ -59,11 +60,6 @@ public class YandexTrafficAdapter extends MapTileAdapter {
} }
protected void updateTimeStampImpl() { protected void updateTimeStampImpl() {
String YANDEX_BASE_URL;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.GINGERBREAD)
YANDEX_BASE_URL = "https://core-jams-rdr.maps.yandex.net";
else
YANDEX_BASE_URL = "http://core-jams-rdr.maps.yandex.net";
if (mTimestamp == null || (System.currentTimeMillis() - lastTimestampUpdated) > DELTA) { if (mTimestamp == null || (System.currentTimeMillis() - lastTimestampUpdated) > DELTA) {
log.info("Updating timestamp"); //$NON-NLS-1$ log.info("Updating timestamp"); //$NON-NLS-1$
try { try {