Merge branch 'master' of https://github.com/osmandapp/Osmand
This commit is contained in:
commit
5065a6f241
10 changed files with 84 additions and 59 deletions
|
@ -224,12 +224,11 @@ public class MapPoiTypes {
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getTranslation(AbstractPoiType abstractPoiType) {
|
public String getTranslation(AbstractPoiType abstractPoiType) {
|
||||||
String translation = null;
|
|
||||||
if(poiTranslator != null) {
|
if(poiTranslator != null) {
|
||||||
translation = poiTranslator.getTranslation(abstractPoiType);
|
String translation = poiTranslator.getTranslation(abstractPoiType);
|
||||||
}
|
if(translation != null) {
|
||||||
if(translation != null) {
|
return translation;
|
||||||
return translation;
|
}
|
||||||
}
|
}
|
||||||
return Algorithms.capitalizeFirstLetterAndLowercase(abstractPoiType.getName().replace('_', ' '));
|
return Algorithms.capitalizeFirstLetterAndLowercase(abstractPoiType.getName().replace('_', ' '));
|
||||||
}
|
}
|
||||||
|
|
|
@ -245,4 +245,18 @@
|
||||||
<string name="poi_water_well">井戸(Water well)</string>
|
<string name="poi_water_well">井戸(Water well)</string>
|
||||||
<string name="poi_standpipe">消火栓(Standpipe)</string>
|
<string name="poi_standpipe">消火栓(Standpipe)</string>
|
||||||
<string name="poi_water_works">浄水場(Water works)</string>
|
<string name="poi_water_works">浄水場(Water works)</string>
|
||||||
|
<string name="poi_boatyard">ボートヤード(Boatyard)</string>
|
||||||
|
<string name="poi_wastewater_plant">下水処理場(Wastewater plant)</string>
|
||||||
|
<string name="poi_water_tower">貯水塔(Water tower)</string>
|
||||||
|
<string name="poi_lock_gate">閘門型水門(Lock gate)</string>
|
||||||
|
<string name="poi_waterway_turning_point">船舶転回所(Waterway turning point)</string>
|
||||||
|
<string name="poi_weir">堰(Weir)</string>
|
||||||
|
<string name="poi_dam">ダム(Dam)</string>
|
||||||
|
<string name="poi_water_mill">水車小屋(Water mill)</string>
|
||||||
|
|
||||||
|
<string name="poi_power_substation">変電所(Substation)</string>
|
||||||
|
<string name="poi_power_transformer">変圧器・トランス(Transformer)</string>
|
||||||
|
<string name="poi_power_plant">発電所・発電施設(Power plant)</string>
|
||||||
|
<string name="poi_power_generator">発電機(Power generator)</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -691,4 +691,8 @@
|
||||||
<string name="poi_trash_disposal">Утилизация мусора</string>
|
<string name="poi_trash_disposal">Утилизация мусора</string>
|
||||||
<string name="poi_accomodation">Проживание</string>
|
<string name="poi_accomodation">Проживание</string>
|
||||||
<string name="poi_child_clothes">Детская одежда</string>
|
<string name="poi_child_clothes">Детская одежда</string>
|
||||||
|
<string name="poi_training">Учебный центр</string>
|
||||||
|
<string name="poi_quarter">Квартал</string>
|
||||||
|
<string name="poi_field_hockey">Хоккейная площадка</string>
|
||||||
|
<string name="poi_team_handball">Командный гандбол</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -457,7 +457,7 @@ public class FavoritesTreeFragment extends OsmandExpandableListFragment {
|
||||||
if(getMyApplication().getRoutingHelper().isRouteCalculated()) {
|
if(getMyApplication().getRoutingHelper().isRouteCalculated()) {
|
||||||
targetPointsHelper.updateRouteAndReferesh(true);
|
targetPointsHelper.updateRouteAndReferesh(true);
|
||||||
}
|
}
|
||||||
IntermediatePointsDialog.openIntermediatePointsDialog(getActivity(), getMyApplication(), false);
|
IntermediatePointsDialog.openIntermediatePointsDialog(getActivity(), getMyApplication(), true);
|
||||||
//MapActivity.launchMapActivityMoveToTop(getActivity());
|
//MapActivity.launchMapActivityMoveToTop(getActivity());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,45 @@
|
||||||
*/
|
*/
|
||||||
package net.osmand.plus.activities.search;
|
package net.osmand.plus.activities.search;
|
||||||
|
|
||||||
|
import gnu.trove.set.hash.TLongHashSet;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Calendar;
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.Iterator;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Map.Entry;
|
||||||
|
|
||||||
|
import net.osmand.ResultMatcher;
|
||||||
|
import net.osmand.access.AccessibleToast;
|
||||||
|
import net.osmand.access.NavigationInfo;
|
||||||
|
import net.osmand.data.Amenity;
|
||||||
|
import net.osmand.data.LatLon;
|
||||||
|
import net.osmand.data.PointDescription;
|
||||||
|
import net.osmand.osm.PoiCategory;
|
||||||
|
import net.osmand.osm.PoiType;
|
||||||
|
import net.osmand.plus.OsmAndFormatter;
|
||||||
|
import net.osmand.plus.OsmAndLocationProvider.OsmAndCompassListener;
|
||||||
|
import net.osmand.plus.OsmAndLocationProvider.OsmAndLocationListener;
|
||||||
|
import net.osmand.plus.OsmandApplication;
|
||||||
|
import net.osmand.plus.OsmandSettings;
|
||||||
|
import net.osmand.plus.R;
|
||||||
|
import net.osmand.plus.activities.EditPOIFilterActivity;
|
||||||
|
import net.osmand.plus.activities.MapActivity;
|
||||||
|
import net.osmand.plus.activities.OsmandListActivity;
|
||||||
|
import net.osmand.plus.dashboard.DashLocationFragment;
|
||||||
|
import net.osmand.plus.dialogs.DirectionsDialogs;
|
||||||
|
import net.osmand.plus.poi.NameFinderPoiFilter;
|
||||||
|
import net.osmand.plus.poi.PoiLegacyFilter;
|
||||||
|
import net.osmand.plus.poi.SearchByNameFilter;
|
||||||
|
import net.osmand.plus.render.RenderingIcons;
|
||||||
|
import net.osmand.plus.views.DirectionDrawable;
|
||||||
|
import net.osmand.util.Algorithms;
|
||||||
|
import net.osmand.util.MapUtils;
|
||||||
|
import net.osmand.util.OpeningHoursParser;
|
||||||
|
import net.osmand.util.OpeningHoursParser.OpeningHours;
|
||||||
import android.app.AlertDialog;
|
import android.app.AlertDialog;
|
||||||
import android.app.AlertDialog.Builder;
|
import android.app.AlertDialog.Builder;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
|
@ -40,47 +79,6 @@ import android.widget.ImageView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import net.osmand.ResultMatcher;
|
|
||||||
import net.osmand.access.AccessibleToast;
|
|
||||||
import net.osmand.access.NavigationInfo;
|
|
||||||
import net.osmand.data.Amenity;
|
|
||||||
import net.osmand.data.LatLon;
|
|
||||||
import net.osmand.data.PointDescription;
|
|
||||||
import net.osmand.osm.PoiCategory;
|
|
||||||
import net.osmand.osm.PoiType;
|
|
||||||
import net.osmand.plus.OsmAndConstants;
|
|
||||||
import net.osmand.plus.OsmAndFormatter;
|
|
||||||
import net.osmand.plus.OsmAndLocationProvider.OsmAndCompassListener;
|
|
||||||
import net.osmand.plus.OsmAndLocationProvider.OsmAndLocationListener;
|
|
||||||
import net.osmand.plus.OsmandApplication;
|
|
||||||
import net.osmand.plus.OsmandSettings;
|
|
||||||
import net.osmand.plus.R;
|
|
||||||
import net.osmand.plus.activities.EditPOIFilterActivity;
|
|
||||||
import net.osmand.plus.activities.MapActivity;
|
|
||||||
import net.osmand.plus.activities.OsmandListActivity;
|
|
||||||
import net.osmand.plus.dashboard.DashLocationFragment;
|
|
||||||
import net.osmand.plus.dialogs.DirectionsDialogs;
|
|
||||||
import net.osmand.plus.poi.NameFinderPoiFilter;
|
|
||||||
import net.osmand.plus.poi.PoiLegacyFilter;
|
|
||||||
import net.osmand.plus.poi.SearchByNameFilter;
|
|
||||||
import net.osmand.plus.render.RenderingIcons;
|
|
||||||
import net.osmand.plus.views.DirectionDrawable;
|
|
||||||
import net.osmand.util.Algorithms;
|
|
||||||
import net.osmand.util.MapUtils;
|
|
||||||
import net.osmand.util.OpeningHoursParser;
|
|
||||||
import net.osmand.util.OpeningHoursParser.OpeningHours;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Calendar;
|
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Map.Entry;
|
|
||||||
|
|
||||||
import gnu.trove.set.hash.TLongHashSet;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Search poi activity
|
* Search poi activity
|
||||||
*/
|
*/
|
||||||
|
@ -779,7 +777,6 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
|
||||||
}
|
}
|
||||||
DirectionDrawable draw = new DirectionDrawable(SearchPOIActivity.this, width, height,
|
DirectionDrawable draw = new DirectionDrawable(SearchPOIActivity.this, width, height,
|
||||||
R.drawable.ic_destination_arrow_white,
|
R.drawable.ic_destination_arrow_white,
|
||||||
|
|
||||||
R.color.color_distance);
|
R.color.color_distance);
|
||||||
int screenOrientation = DashLocationFragment.getScreenOrientation(SearchPOIActivity.this);
|
int screenOrientation = DashLocationFragment.getScreenOrientation(SearchPOIActivity.this);
|
||||||
if (loc != null) {
|
if (loc != null) {
|
||||||
|
|
|
@ -157,7 +157,7 @@ public class DashTrackFragment extends DashBaseFragment {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateShowOnMap(final OsmandApplication app, final File f, View v, final ImageButton showOnMap) {
|
private void updateShowOnMap(final OsmandApplication app, final File f, final View pView, final ImageButton showOnMap) {
|
||||||
final GpxSelectionHelper selectedGpxHelper = app.getSelectedGpxHelper();
|
final GpxSelectionHelper selectedGpxHelper = app.getSelectedGpxHelper();
|
||||||
final SelectedGpxFile selected = selectedGpxHelper.getSelectedFileByPath(f.getAbsolutePath());
|
final SelectedGpxFile selected = selectedGpxHelper.getSelectedFileByPath(f.getAbsolutePath());
|
||||||
if(selected != null) {
|
if(selected != null) {
|
||||||
|
@ -169,7 +169,7 @@ public class DashTrackFragment extends DashBaseFragment {
|
||||||
AvailableGPXFragment.GpxInfo info = new AvailableGPXFragment.GpxInfo();
|
AvailableGPXFragment.GpxInfo info = new AvailableGPXFragment.GpxInfo();
|
||||||
info.subfolder = "";
|
info.subfolder = "";
|
||||||
info.file = f;
|
info.file = f;
|
||||||
AvailableGPXFragment.udpateGpxInfoView(v, info, app, true);
|
AvailableGPXFragment.udpateGpxInfoView(pView, info, app, true);
|
||||||
updateShowOnMap(app, f, v, showOnMap);
|
updateShowOnMap(app, f, v, showOnMap);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -307,7 +307,7 @@ public class PoiFiltersHelper {
|
||||||
public class PoiFilterDbHelper {
|
public class PoiFilterDbHelper {
|
||||||
|
|
||||||
public static final String DATABASE_NAME = "poi_filters"; //$NON-NLS-1$
|
public static final String DATABASE_NAME = "poi_filters"; //$NON-NLS-1$
|
||||||
private static final int DATABASE_VERSION = 2;
|
private static final int DATABASE_VERSION = 4;
|
||||||
private static final String FILTER_NAME = "poi_filters"; //$NON-NLS-1$
|
private static final String FILTER_NAME = "poi_filters"; //$NON-NLS-1$
|
||||||
private static final String FILTER_COL_NAME = "name"; //$NON-NLS-1$
|
private static final String FILTER_COL_NAME = "name"; //$NON-NLS-1$
|
||||||
private static final String FILTER_COL_ID = "id"; //$NON-NLS-1$
|
private static final String FILTER_COL_ID = "id"; //$NON-NLS-1$
|
||||||
|
@ -399,11 +399,12 @@ public class PoiFiltersHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onUpgrade(SQLiteConnection conn, int oldVersion, int newVersion) {
|
public void onUpgrade(SQLiteConnection conn, int oldVersion, int newVersion) {
|
||||||
if (newVersion == 2 || newVersion == 3) {
|
// if (newVersion == 2 || newVersion == 3) {
|
||||||
upgradeFilters(conn, false);
|
// upgradeFilters(conn, false);
|
||||||
} else {
|
// } else {
|
||||||
upgradeFilters(conn, true);
|
// from version 4 (upgrade)
|
||||||
}
|
upgradeFilters(conn, true);
|
||||||
|
// }
|
||||||
conn.setVersion(newVersion);
|
conn.setVersion(newVersion);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -231,6 +231,9 @@ public class MapInfoWidgetsFactory {
|
||||||
if (routingHelper.isFollowingMode()) {
|
if (routingHelper.isFollowingMode()) {
|
||||||
if(settings.SHOW_STREET_NAME.get()) {
|
if(settings.SHOW_STREET_NAME.get()) {
|
||||||
text = routingHelper.getCurrentName(type);
|
text = routingHelper.getCurrentName(type);
|
||||||
|
if(text == null) {
|
||||||
|
text = "";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
int di = MapRouteInfoControl.getDirectionInfo();
|
int di = MapRouteInfoControl.getDirectionInfo();
|
||||||
|
@ -243,6 +246,9 @@ public class MapInfoWidgetsFactory {
|
||||||
// if(next.distance > 0) {
|
// if(next.distance > 0) {
|
||||||
// text += " " + OsmAndFormatter.getFormattedDistance(next.distance, map.getMyApplication());
|
// text += " " + OsmAndFormatter.getFormattedDistance(next.distance, map.getMyApplication());
|
||||||
// }
|
// }
|
||||||
|
if(text == null) {
|
||||||
|
text = "";
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -252,7 +258,8 @@ public class MapInfoWidgetsFactory {
|
||||||
RouteDataObject rt = locationProvider.getLastKnownRouteSegment();
|
RouteDataObject rt = locationProvider.getLastKnownRouteSegment();
|
||||||
if(rt != null) {
|
if(rt != null) {
|
||||||
text = RoutingHelper.formatStreetName(rt.getName(), rt.getRef(), rt.getDestinationName());
|
text = RoutingHelper.formatStreetName(rt.getName(), rt.getRef(), rt.getDestinationName());
|
||||||
} else {
|
}
|
||||||
|
if(text == null) {
|
||||||
text = "";
|
text = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
4
eclipse-compile/observable/.gitignore
vendored
4
eclipse-compile/observable/.gitignore
vendored
|
@ -1,2 +1,4 @@
|
||||||
/build
|
/build
|
||||||
bin
|
/bin
|
||||||
|
/gen
|
||||||
|
|
||||||
|
|
3
plugins/.gitignore
vendored
3
plugins/.gitignore
vendored
|
@ -7,4 +7,5 @@
|
||||||
*/local.properties
|
*/local.properties
|
||||||
|
|
||||||
# Output files
|
# Output files
|
||||||
*/build
|
*/build
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue