moved string resource to different file. Removed unused code. Enabled plugin automatically.
This commit is contained in:
parent
6582bbf42a
commit
a98e09f93e
4 changed files with 6 additions and 25 deletions
|
@ -1,11 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="map_widget_route_points">Route steps</string>
|
||||
<string name="route_points_no_gpx">No gpx</string>
|
||||
<string name="mark_as_current">Mark as current</string>
|
||||
<string name="marking_as_visited">Marking as visited…</string>
|
||||
<string name="current_route">Current route:</string>
|
||||
<string name="done">Done</string>
|
||||
<string name="marking_as_unvisited">Marking as unvisited...</string>
|
||||
<string name="marking_as_unvisited">Marking as unvisited…</string>
|
||||
<string name="select_gpx">Select gpx</string>
|
||||
<string name="save_gpx">Save gpx</string>
|
||||
<string name="start_route">Start route</string>
|
||||
|
|
|
@ -880,7 +880,6 @@ Afghanistan, Albania, Algeria, Andorra, Angola, Anguilla, Antigua and Barbuda, A
|
|||
<string name="map_widget_right_stack">Right panel:</string>
|
||||
<string name="map_widget_left_stack">Left panel:</string>
|
||||
<string name="map_widget_parking">Parking</string>
|
||||
<string name="map_widget_route_steps">Route steps</string>
|
||||
<string name="all_route_points">All route points</string>
|
||||
<string name="map_widget_monitoring">GPX recording</string>
|
||||
<string name="map_widget_speed">Speed</string>
|
||||
|
|
|
@ -83,9 +83,9 @@ public abstract class OsmandPlugin {
|
|||
installedPlugins.add(parking);
|
||||
}
|
||||
|
||||
//final RouteStepsPlugin routeSteps = new RouteStepsPlugin(app);
|
||||
//installPlugin(ROUTE_STEPS_PLUGIN_COMPONENT, RouteStepsPlugin.ID, app, routeSteps);
|
||||
installedPlugins.add(new RoutePointsPlugin(app));
|
||||
RoutePointsPlugin routePointsPlugin = new RoutePointsPlugin(app);
|
||||
installedPlugins.add(routePointsPlugin);
|
||||
enablePlugin(app,routePointsPlugin,true);
|
||||
|
||||
installPlugin(OSMODROID_PLUGIN_COMPONENT, OsMoDroidPlugin.ID, app, new OsMoDroidPlugin(app));
|
||||
installedPlugins.add(new OsmEditingPlugin(app));
|
||||
|
|
|
@ -11,7 +11,6 @@ import net.osmand.plus.views.OsmandMapLayer;
|
|||
import net.osmand.plus.views.OsmandMapTileView;
|
||||
import net.osmand.plus.views.mapwidgets.TextInfoWidget;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
@ -123,7 +122,7 @@ public class RoutePointsPlugin extends OsmandPlugin {
|
|||
if (mapInfoLayer != null) {
|
||||
routeStepsControl = createRouteStepsInfoControl(activity, mapInfoLayer.getPaintSubText(), mapInfoLayer.getPaintSubText());
|
||||
mapInfoLayer.getMapInfoControls().registerSideWidget(routeStepsControl,
|
||||
R.drawable.widget_parking, R.string.map_widget_route_steps, "route_steps", false, 8);
|
||||
R.drawable.widget_target, R.string.map_widget_route_points, "route_steps", false, 8);
|
||||
mapInfoLayer.recreateControls();
|
||||
}
|
||||
}
|
||||
|
@ -233,24 +232,6 @@ public class RoutePointsPlugin extends OsmandPlugin {
|
|||
refreshPointsStatus();
|
||||
}
|
||||
|
||||
//saves point status value to gpx extention file
|
||||
public void markPointAsVisited(GPXUtilities.WptPt point) {
|
||||
if (point.equals(currentPoint)) {
|
||||
currentPoint = null;
|
||||
}
|
||||
int pos = findPointPosition(point);
|
||||
Map<String, String> map = currentRoute.getExtensionsToWrite();
|
||||
|
||||
String mapKey = POINT_KEY + pos + VISITED_KEY;
|
||||
|
||||
//value is current time
|
||||
Calendar c = Calendar.getInstance();
|
||||
long number = c.getTimeInMillis();
|
||||
map.put(mapKey, String.valueOf(number));
|
||||
|
||||
refreshPointsStatus();
|
||||
}
|
||||
|
||||
public Integer getCurrentPointIndex() {
|
||||
return currentPointIndex;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue