deleted unused class and little hotfix to xml res file
This commit is contained in:
parent
c1d038ace1
commit
ab118ebc46
6 changed files with 4 additions and 99 deletions
|
@ -1,13 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item
|
||||
android:id="@+id/one"
|
||||
android:title="@string/route_step_menu_mark_as_next"/>
|
||||
|
||||
<item
|
||||
android:id="@+id/two"
|
||||
android:title="@string/route_step_menu_show_on_map"/>
|
||||
|
||||
</menu>
|
|
@ -1877,4 +1877,4 @@ Afghanistan, Albania, Algeria, Andorra, Angola, Anguilla, Antigua and Barbuda, A
|
|||
<string name="av_photo_play_sound">Play sound on photo shot</string>
|
||||
<string name="av_photo_play_sound_descr">Choose whether to play a sound when shooting photos</string>
|
||||
<string name="navigation_intent_invalid">Invalid format: %s</string>
|
||||
</resources>
|
||||
</resources>
|
|
@ -83,7 +83,7 @@ public abstract class OsmandPlugin {
|
|||
installedPlugins.add(parking);
|
||||
}
|
||||
|
||||
//RoutePointsPlugin routePointsPlugin = new RoutePointsPlugin(app);
|
||||
//routePointsPlugin routePointsPlugin = new RoutePointsPlugin(app);
|
||||
//installedPlugins.add(routePointsPlugin);
|
||||
//enablePlugin(app,routePointsPlugin,true);
|
||||
|
||||
|
|
|
@ -382,7 +382,7 @@ public class RoutePointsActivity extends OsmandListActivity {
|
|||
item.setIcon(R.drawable.ic_action_signpost_dark);
|
||||
item = menu.add(getString(R.string.mark_as_visited));
|
||||
item.setIcon(R.drawable.ic_action_ok_dark);
|
||||
item = menu.add(getString(R.string.show_on_map));
|
||||
item = menu.add(getString(R.string.show_poi_on_map));
|
||||
item.setIcon(R.drawable.ic_action_map_marker_dark);
|
||||
return true;
|
||||
}
|
||||
|
@ -398,7 +398,7 @@ public class RoutePointsActivity extends OsmandListActivity {
|
|||
plugin.setCurrentPoint(sortedPointsList.get(selectedItemIndex));
|
||||
sortPoints();
|
||||
displayListView();
|
||||
} else if (menuItem.getTitle().equals(getResources().getString(R.string.show_on_map))) {
|
||||
} else if (menuItem.getTitle().equals(getResources().getString(R.string.show_poi_on_map))) {
|
||||
GPXUtilities.WptPt point = sortedPointsList.get(selectedItemIndex);
|
||||
app.getSettings().setMapLocationToShow(point.lat, point.lon, app.getSettings().getMapZoomToShow());
|
||||
finish();
|
||||
|
|
|
@ -1,67 +0,0 @@
|
|||
package net.osmand.plus.routepointsnavigation;
|
||||
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.PointF;
|
||||
import net.osmand.data.LatLon;
|
||||
import net.osmand.data.RotatedTileBox;
|
||||
import net.osmand.plus.activities.MapActivity;
|
||||
import net.osmand.plus.views.ContextMenuLayer;
|
||||
import net.osmand.plus.views.OsmandMapLayer;
|
||||
import net.osmand.plus.views.OsmandMapTileView;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by Barsik on 10.06.2014.
|
||||
*/
|
||||
public class RoutePointsLayer extends OsmandMapLayer implements ContextMenuLayer.IContextMenuProvider {
|
||||
|
||||
private final MapActivity map;
|
||||
private RoutePointsPlugin plugin;
|
||||
|
||||
public RoutePointsLayer(MapActivity map, RoutePointsPlugin plugin){
|
||||
this.map = map;
|
||||
this.plugin = plugin;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void collectObjectsFromPoint(PointF point, RotatedTileBox tileBox, List<Object> o) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public LatLon getObjectLocation(Object o) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getObjectDescription(Object o) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getObjectName(Object o) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initLayer(OsmandMapTileView view) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDraw(Canvas canvas, RotatedTileBox tileBox, DrawSettings settings) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void destroyLayer() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean drawInScreenPixels() {
|
||||
return false;
|
||||
}
|
||||
}
|
|
@ -29,7 +29,6 @@ public class RoutePointsPlugin extends OsmandPlugin {
|
|||
private GPXUtilities.GPXFile gpx;
|
||||
private GPXUtilities.Route currentRoute;
|
||||
private GPXUtilities.WptPt currentPoint;
|
||||
private RoutePointsLayer routeStepsLayer;
|
||||
private List<GPXUtilities.WptPt> pointsList;
|
||||
private TextInfoWidget routeStepsControl;
|
||||
|
||||
|
@ -107,16 +106,6 @@ public class RoutePointsPlugin extends OsmandPlugin {
|
|||
getCurrentPoint();
|
||||
}
|
||||
|
||||
public void registerLayers(MapActivity activity) {
|
||||
// remove old if existing after turn
|
||||
if (routeStepsLayer != null) {
|
||||
activity.getMapView().removeLayer(routeStepsLayer);
|
||||
}
|
||||
routeStepsLayer = new RoutePointsLayer(activity, this);
|
||||
activity.getMapView().addLayer(routeStepsLayer, 5.5f);
|
||||
registerWidget(activity);
|
||||
}
|
||||
|
||||
private void registerWidget(MapActivity activity) {
|
||||
MapInfoLayer mapInfoLayer = activity.getMapLayers().getMapInfoLayer();
|
||||
if (mapInfoLayer != null) {
|
||||
|
@ -149,10 +138,6 @@ public class RoutePointsPlugin extends OsmandPlugin {
|
|||
@Override
|
||||
public void updateLayers(OsmandMapTileView mapView, MapActivity activity) {
|
||||
|
||||
if (routeStepsLayer == null) {
|
||||
registerLayers(activity);
|
||||
}
|
||||
|
||||
if (routeStepsControl == null) {
|
||||
registerWidget(activity);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue