Update hillshade layer

This commit is contained in:
Victor Shcherb 2013-04-07 16:55:38 +02:00
parent e22a012884
commit f40fbc1367
2 changed files with 3 additions and 8 deletions

View file

@ -39,6 +39,7 @@ public class HillshadeLayer extends MapTileLayer {
super(false); super(false);
final OsmandApplication app = activity.getMyApplication(); final OsmandApplication app = activity.getMyApplication();
indexHillshadeFiles(app); indexHillshadeFiles(app);
setAlpha(100);
setMap(createTileSource(activity)); setMap(createTileSource(activity));
} }

View file

@ -1,25 +1,20 @@
package net.osmand.plus.srtmplugin; package net.osmand.plus.srtmplugin;
import net.osmand.PlatformUtil;
import net.osmand.plus.ApplicationMode; import net.osmand.plus.ApplicationMode;
import net.osmand.plus.ContextMenuAdapter; import net.osmand.plus.ContextMenuAdapter;
import net.osmand.plus.ContextMenuAdapter.OnContextMenuClick;
import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandApplication;
import net.osmand.plus.OsmandPlugin; import net.osmand.plus.OsmandPlugin;
import net.osmand.plus.OsmandSettings; import net.osmand.plus.OsmandSettings;
import net.osmand.plus.ContextMenuAdapter.OnContextMenuClick;
import net.osmand.plus.OsmandSettings.CommonPreference; import net.osmand.plus.OsmandSettings.CommonPreference;
import net.osmand.plus.R; import net.osmand.plus.R;
import net.osmand.plus.activities.MapActivity; import net.osmand.plus.activities.MapActivity;
import net.osmand.plus.views.OsmandMapTileView; import net.osmand.plus.views.OsmandMapTileView;
import org.apache.commons.logging.Log;
import android.content.DialogInterface; import android.content.DialogInterface;
public class SRTMPlugin extends OsmandPlugin { public class SRTMPlugin extends OsmandPlugin {
public static final String ID = "osmand.srtm"; public static final String ID = "osmand.srtm";
private static final Log log = PlatformUtil.getLog(SRTMPlugin.class);
private OsmandApplication app; private OsmandApplication app;
private boolean paid; private boolean paid;
private HillshadeLayer hillshadeLayer; private HillshadeLayer hillshadeLayer;
@ -73,8 +68,6 @@ public class SRTMPlugin extends OsmandPlugin {
hillshadeLayer = new HillshadeLayer(activity, this); hillshadeLayer = new HillshadeLayer(activity, this);
if (HILLSHADE.get()) { if (HILLSHADE.get()) {
activity.getMapView().addLayer(hillshadeLayer, 0.6f); activity.getMapView().addLayer(hillshadeLayer, 0.6f);
hillshadeLayer.setAlpha(100);
mapView.refreshMap();
} }
} }
@ -91,6 +84,7 @@ public class SRTMPlugin extends OsmandPlugin {
} else { } else {
if (hillshadeLayer != null) { if (hillshadeLayer != null) {
mapView.removeLayer(hillshadeLayer); mapView.removeLayer(hillshadeLayer);
activity.refreshMap();
} }
} }
} }