small fixes in names, ids
This commit is contained in:
parent
b83a01dbd5
commit
7a1aab7414
5 changed files with 18 additions and 19 deletions
|
@ -58,7 +58,7 @@ import net.osmand.plus.views.layers.PointLocationLayer;
|
|||
import net.osmand.plus.views.layers.PointNavigationLayer;
|
||||
import net.osmand.plus.views.layers.RouteLayer;
|
||||
import net.osmand.plus.views.layers.RadiusRulerControlLayer;
|
||||
import net.osmand.plus.views.layers.RulerByTapControlLayer;
|
||||
import net.osmand.plus.views.layers.DistanceRulerControlLayer;
|
||||
import net.osmand.plus.views.layers.TransportStopsLayer;
|
||||
import net.osmand.plus.views.mapwidgets.MapWidgetRegistry;
|
||||
|
||||
|
@ -84,7 +84,7 @@ public class MapActivityLayers {
|
|||
private TransportStopsLayer transportStopsLayer;
|
||||
private PointLocationLayer locationLayer;
|
||||
private RadiusRulerControlLayer radiusRulerControlLayer;
|
||||
private RulerByTapControlLayer rulerByTapControlLayer;
|
||||
private DistanceRulerControlLayer distanceRulerControlLayer;
|
||||
private PointNavigationLayer navigationLayer;
|
||||
private MapMarkersLayer mapMarkersLayer;
|
||||
private ImpassableRoadsLayer impassableRoadsLayer;
|
||||
|
@ -174,8 +174,8 @@ public class MapActivityLayers {
|
|||
radiusRulerControlLayer = new RadiusRulerControlLayer(activity);
|
||||
mapView.addLayer(radiusRulerControlLayer, 7.8f);
|
||||
// 7.9 ruler by tap control layer
|
||||
rulerByTapControlLayer = new RulerByTapControlLayer(activity);
|
||||
mapView.addLayer(rulerByTapControlLayer, 7.9f);
|
||||
distanceRulerControlLayer = new DistanceRulerControlLayer(activity);
|
||||
mapView.addLayer(distanceRulerControlLayer, 7.9f);
|
||||
// 8. context menu layer
|
||||
// 9. map info layer
|
||||
mapInfoLayer = new MapInfoLayer(activity, routeLayer);
|
||||
|
@ -621,8 +621,8 @@ public class MapActivityLayers {
|
|||
return radiusRulerControlLayer;
|
||||
}
|
||||
|
||||
public RulerByTapControlLayer getRulerByTapControlLayer() {
|
||||
return rulerByTapControlLayer;
|
||||
public DistanceRulerControlLayer getDistanceRulerControlLayer() {
|
||||
return distanceRulerControlLayer;
|
||||
}
|
||||
|
||||
public MapInfoLayer getMapInfoLayer() {
|
||||
|
|
|
@ -700,9 +700,9 @@ public class OsmandSettings {
|
|||
return false;
|
||||
}
|
||||
|
||||
public final CommonPreference<RadiusRulerMode> RADIUS_RULER_MODE = new EnumStringPreference<>(this, "radius_ruler_mode", RadiusRulerMode.FIRST, RadiusRulerMode.values()).makeGlobal().makeShared();
|
||||
public final CommonPreference<RadiusRulerMode> RADIUS_RULER_MODE = new EnumStringPreference<>(this, "ruler_mode", RadiusRulerMode.FIRST, RadiusRulerMode.values()).makeGlobal().makeShared();
|
||||
public final OsmandPreference<Boolean> SHOW_COMPASS_CONTROL_RULER = new BooleanPreference(this, "show_compass_ruler", true).makeGlobal().makeShared();
|
||||
public final OsmandPreference<Boolean> SHOW_RULER_BY_TAP = new BooleanPreference(this, "show_ruler_by_tap", false).makeProfile();
|
||||
public final OsmandPreference<Boolean> SHOW_DISTANCE_RULER = new BooleanPreference(this, "show_distance_ruler", false).makeProfile();
|
||||
|
||||
public final CommonPreference<Boolean> SHOW_LINES_TO_FIRST_MARKERS = new BooleanPreference(this, "show_lines_to_first_markers", false).makeProfile();
|
||||
public final CommonPreference<Boolean> SHOW_ARROWS_TO_FIRST_MARKERS = new BooleanPreference(this, "show_arrows_to_first_markers", false).makeProfile();
|
||||
|
|
|
@ -28,7 +28,7 @@ import net.osmand.util.MapUtils;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class RulerByTapControlLayer extends OsmandMapLayer {
|
||||
public class DistanceRulerControlLayer extends OsmandMapLayer {
|
||||
|
||||
private static final int VERTICAL_OFFSET = 15;
|
||||
private static final long DRAW_TIME = 2000;
|
||||
|
@ -65,7 +65,7 @@ public class RulerByTapControlLayer extends OsmandMapLayer {
|
|||
|
||||
private Handler handler;
|
||||
|
||||
public RulerByTapControlLayer(MapActivity mapActivity) {
|
||||
public DistanceRulerControlLayer(MapActivity mapActivity) {
|
||||
this.mapActivity = mapActivity;
|
||||
}
|
||||
|
||||
|
@ -176,7 +176,7 @@ public class RulerByTapControlLayer extends OsmandMapLayer {
|
|||
}
|
||||
|
||||
public boolean rulerModeOn() {
|
||||
return app.getSettings().SHOW_RULER_BY_TAP.get();
|
||||
return app.getSettings().SHOW_DISTANCE_RULER.get();
|
||||
}
|
||||
|
||||
private void refreshMapDelayed() {
|
|
@ -780,8 +780,7 @@ public class MapControlsLayer extends OsmandMapLayer {
|
|||
if (app.getRoutingHelper().isFollowingMode() || app.getRoutingHelper().isPauseNavigation()
|
||||
|| mapActivity.getMeasurementToolFragment() != null
|
||||
|| mapActivity.getPlanRouteFragment() != null
|
||||
|| mapActivity.getMapLayers().getRadiusRulerControlLayer().rulerModeOn()
|
||||
|| mapActivity.getMapLayers().getRulerByTapControlLayer().rulerModeOn()) {
|
||||
|| mapActivity.getMapLayers().getDistanceRulerControlLayer().rulerModeOn()) {
|
||||
return;
|
||||
}
|
||||
if (isMapControlsVisible()) {
|
||||
|
@ -1070,7 +1069,7 @@ public class MapControlsLayer extends OsmandMapLayer {
|
|||
}
|
||||
}
|
||||
|
||||
public void updateTransparencySlider () {
|
||||
public void updateTransparencySlider() {
|
||||
LayerTransparencySeekbarMode seekbarMode = settings.LAYER_TRANSPARENCY_SEEKBAR_MODE.get();
|
||||
if (OsmandPlugin.getEnabledPlugin(OsmandRasterMapsPlugin.class) != null) {
|
||||
if (seekbarMode == LayerTransparencySeekbarMode.OVERLAY && settings.MAP_OVERLAY.get() != null) {
|
||||
|
|
|
@ -372,8 +372,8 @@ public class MapWidgetRegistry {
|
|||
|
||||
cm.addItem(new ContextMenuItem.ItemBuilder().setTitleId(R.string.map_widget_distance_by_tap, map)
|
||||
.setIcon(R.drawable.ic_action_ruler_line)
|
||||
.setSelected(settings.SHOW_RULER_BY_TAP.get())
|
||||
.setListener(new AppearanceItemClickListener(settings.SHOW_RULER_BY_TAP, map))
|
||||
.setSelected(settings.SHOW_DISTANCE_RULER.get())
|
||||
.setListener(new AppearanceItemClickListener(settings.SHOW_DISTANCE_RULER, map))
|
||||
.setLayout(R.layout.list_item_icon_and_switch).createItem());
|
||||
|
||||
cm.addItem(new ContextMenuItem.ItemBuilder().setTitleId(R.string.map_markers, map)
|
||||
|
|
Loading…
Reference in a new issue