diff --git a/OsmAnd-java/src/net/osmand/binary/GeocodingUtilities.java b/OsmAnd-java/src/net/osmand/binary/GeocodingUtilities.java
index 835a74a699..841535779d 100644
--- a/OsmAnd-java/src/net/osmand/binary/GeocodingUtilities.java
+++ b/OsmAnd-java/src/net/osmand/binary/GeocodingUtilities.java
@@ -37,8 +37,8 @@ public class GeocodingUtilities {
private static final Log log = PlatformUtil.getLog(GeocodingUtilities.class);
- // Location to test parameters http://www.openstreetmap.org/#map=18/53.896473/27.540071 (hno 44)
- // BUG http://www.openstreetmap.org/#map=19/50.9356/13.35348 (hno 26) street is
+ // Location to test parameters https://www.openstreetmap.org/#map=18/53.896473/27.540071 (hno 44)
+ // BUG https://www.openstreetmap.org/#map=19/50.9356/13.35348 (hno 26) street is
public static final float THRESHOLD_MULTIPLIER_SKIP_STREETS_AFTER = 5;
public static final float STOP_SEARCHING_STREET_WITH_MULTIPLIER_RADIUS = 250;
public static final float STOP_SEARCHING_STREET_WITHOUT_MULTIPLIER_RADIUS = 400;
diff --git a/OsmAnd-java/src/net/osmand/osm/MapRenderingTypes.java b/OsmAnd-java/src/net/osmand/osm/MapRenderingTypes.java
index 74b1e5eb07..58f636fce3 100644
--- a/OsmAnd-java/src/net/osmand/osm/MapRenderingTypes.java
+++ b/OsmAnd-java/src/net/osmand/osm/MapRenderingTypes.java
@@ -20,7 +20,7 @@ import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
/**
- * reference : http://wiki.openstreetmap.org/wiki/Map_Features
+ * reference : https://wiki.openstreetmap.org/wiki/Map_Features
*/
public abstract class MapRenderingTypes {
diff --git a/OsmAnd-java/src/net/osmand/search/SearchUICore.java b/OsmAnd-java/src/net/osmand/search/SearchUICore.java
index 56828d62b2..b0a98941fc 100644
--- a/OsmAnd-java/src/net/osmand/search/SearchUICore.java
+++ b/OsmAnd-java/src/net/osmand/search/SearchUICore.java
@@ -372,7 +372,13 @@ public class SearchUICore {
SearchResultMatcher rm = new SearchResultMatcher(matcher, phrase, request, requestNumber, totalLimit);
rm.searchStarted(phrase);
if (TIMEOUT_BETWEEN_CHARS > 0 && delayedExecution) {
- Thread.sleep(TIMEOUT_BETWEEN_CHARS);
+ long startTime = System.currentTimeMillis();
+ while (System.currentTimeMillis() - startTime <= TIMEOUT_BETWEEN_CHARS) {
+ if (rm.isCancelled()) {
+ return;
+ }
+ Thread.sleep(TIMEOUT_BEFORE_SEARCH);
+ }
} else if (TIMEOUT_BEFORE_SEARCH > 0) {
Thread.sleep(TIMEOUT_BEFORE_SEARCH);
}
diff --git a/OsmAnd-java/src/net/osmand/util/GeoPointParserUtil.java b/OsmAnd-java/src/net/osmand/util/GeoPointParserUtil.java
index 33f4817b5e..db33f4e77e 100644
--- a/OsmAnd-java/src/net/osmand/util/GeoPointParserUtil.java
+++ b/OsmAnd-java/src/net/osmand/util/GeoPointParserUtil.java
@@ -266,20 +266,20 @@ public class GeoPointParserUtil {
actual = GeoPointParserUtil.parse(url);
assertGeoPoint(actual, new GeoParsedPoint(dlat, dlon, z));
- // http://openstreetmap.org/#map=11/34/-106
+ // https://openstreetmap.org/#map=11/34/-106
z = 11;
url = "https://openstreetmap.org/#map=" + z + "/" + ilat + "/" + ilon;
System.out.println("url: " + url);
actual = GeoPointParserUtil.parse(url);
assertGeoPoint(actual, new GeoParsedPoint(ilat, ilon, z));
- // http://openstreetmap.org/#map=11/34.99393/-106.61568
+ // https://openstreetmap.org/#map=11/34.99393/-106.61568
url = "https://openstreetmap.org/#map=" + z + "/" + dlat + "/" + dlon;
System.out.println("url: " + url);
actual = GeoPointParserUtil.parse(url);
assertGeoPoint(actual, new GeoParsedPoint(dlat, dlon, z));
- // http://openstreetmap.org/#11/34.99393/-106.61568
+ // https://openstreetmap.org/#11/34.99393/-106.61568
url = "https://openstreetmap.org/#" + z + "/" + dlat + "/" + dlon;
System.out.println("url: " + url);
actual = GeoPointParserUtil.parse(url);
@@ -300,52 +300,52 @@ public class GeoPointParserUtil {
// https://wiki.openstreetmap.org/wiki/Shortlink
- // http://osm.org/go/TyFSutZ-?m=
+ // https://osm.org/go/TyFSutZ-?m=
// https://www.openstreetmap.org/?mlat=34.993933029174805&mlon=-106.61568069458008#map=15/34.99393/-106.61568
z = 15;
- url = "http://osm.org/go/TyFYuF6P--?m=";
+ url = "https://osm.org/go/TyFYuF6P--?m=";
System.out.println("url: " + url);
actual = GeoPointParserUtil.parse(url);
assertApproximateGeoPoint(actual, new GeoParsedPoint(longLat, longLon, z));
- // http://osm.org/go/TyFS--
- // http://www.openstreetmap.org/#map=3/34.99/-106.70
+ // https://osm.org/go/TyFS--
+ // https://www.openstreetmap.org/#map=3/34.99/-106.70
z = 3;
- url = "http://osm.org/go/TyFS--";
+ url = "https://osm.org/go/TyFS--";
System.out.println("url: " + url);
actual = GeoPointParserUtil.parse(url);
assertApproximateGeoPoint(actual, new GeoParsedPoint(dlat, dlon, z));
- // http://osm.org/go/TyFYuF6P~~-?m // current shortlink format with "~"
+ // https://osm.org/go/TyFYuF6P~~-?m // current shortlink format with "~"
// https://www.openstreetmap.org/?mlat=34.993933029174805&mlon=-106.61568069458008#map=15/34.99393/-106.61568
z = 20;
- url = "http://osm.org/go/TyFYuF6P~~-?m";
+ url = "https://osm.org/go/TyFYuF6P~~-?m";
System.out.println("url: " + url);
actual = GeoPointParserUtil.parse(url);
assertApproximateGeoPoint(actual, new GeoParsedPoint(longLat, longLon, z));
- // http://osm.org/go/TyFYuF6P@@--?m= // old, deprecated shortlink format with "@"
+ // https://osm.org/go/TyFYuF6P@@--?m= // old, deprecated shortlink format with "@"
// https://www.openstreetmap.org/?mlat=34.993933029174805&mlon=-106.61568069458008#map=15/34.99393/-106.61568
z = 21;
- url = "http://osm.org/go/TyFYuF6P@@--?m=";
+ url = "https://osm.org/go/TyFYuF6P@@--?m=";
System.out.println("url: " + url);
actual = GeoPointParserUtil.parse(url);
assertApproximateGeoPoint(actual, new GeoParsedPoint(longLat, longLon, z));
- // http://openstreetmap.de/zoom=11&lat=34&lon=-106
+ // https://openstreetmap.de/zoom=11&lat=34&lon=-106
z = 11;
url = "https://openstreetmap.de/zoom=" + z + "&lat=" + ilat + "&lon=" + ilon;
System.out.println("url: " + url);
actual = GeoPointParserUtil.parse(url);
assertGeoPoint(actual, new GeoParsedPoint(ilat, ilon, z));
- // http://openstreetmap.de/zoom=11&lat=34.99393&lon=-106.61568
+ // https://openstreetmap.de/zoom=11&lat=34.99393&lon=-106.61568
url = "https://openstreetmap.de/zoom=" + z + "&lat=" + dlat + "&lon=" + dlon;
System.out.println("url: " + url);
actual = GeoPointParserUtil.parse(url);
assertGeoPoint(actual, new GeoParsedPoint(dlat, dlon, z));
- // http://openstreetmap.de/lat=34.99393&lon=-106.61568&zoom=11
+ // https://openstreetmap.de/lat=34.99393&lon=-106.61568&zoom=11
url = "https://openstreetmap.de/lat=" + dlat + "&lon=" + dlon + "&zoom=" + z;
System.out.println("url: " + url);
actual = GeoPointParserUtil.parse(url);
@@ -656,13 +656,13 @@ public class GeoPointParserUtil {
String urls[] = {
"https://openstreetmap.org/go/0LQ127-?m",
- "http://osm.org/go/0LQ127-?m",
- "http://osm.org/go/0EEQjE==",
- "http://osm.org/go/0EEQjEEb",
- "http://osm.org/go/0EE~jEEb",
- "http://osm.org/go/0EE@jEEb",
- "http://osm.org/go/~~~~",
- "http://osm.org/go/@@@@",
+ "https://osm.org/go/0LQ127-?m",
+ "https://osm.org/go/0EEQjE==",
+ "https://osm.org/go/0EEQjEEb",
+ "https://osm.org/go/0EE~jEEb",
+ "https://osm.org/go/0EE@jEEb",
+ "https://osm.org/go/~~~~",
+ "https://osm.org/go/@@@@",
"https://www.openstreetmap.org/#map=0/0/0",
"https://www.openstreetmap.org/#map=0/180/180",
"https://www.openstreetmap.org/#map=0/-180/-180",
diff --git a/OsmAnd-java/src/net/osmand/util/MapUtils.java b/OsmAnd-java/src/net/osmand/util/MapUtils.java
index 6046e985c7..174b00e958 100644
--- a/OsmAnd-java/src/net/osmand/util/MapUtils.java
+++ b/OsmAnd-java/src/net/osmand/util/MapUtils.java
@@ -302,9 +302,9 @@ public class MapUtils {
}
// Examples
-// System.out.println(buildShortOsmUrl(51.51829d, 0.07347d, 16)); // http://osm.org/go/0EEQsyfu
-// System.out.println(buildShortOsmUrl(52.30103d, 4.862927d, 18)); // http://osm.org/go/0E4_JiVhs
-// System.out.println(buildShortOsmUrl(40.59d, -115.213d, 9)); // http://osm.org/go/TelHTB--
+// System.out.println(buildShortOsmUrl(51.51829d, 0.07347d, 16)); // https://osm.org/go/0EEQsyfu
+// System.out.println(buildShortOsmUrl(52.30103d, 4.862927d, 18)); // https://osm.org/go/0E4_JiVhs
+// System.out.println(buildShortOsmUrl(40.59d, -115.213d, 9)); // https://osm.org/go/TelHTB--
public static String buildShortOsmUrl(double latitude, double longitude, int zoom) {
return BASE_SHORT_OSM_URL + createShortLinkString(latitude, longitude, zoom) + "?m";
}
diff --git a/OsmAnd/no_translate.xml b/OsmAnd/no_translate.xml
index 5b3ad7728a..ffaadc2550 100644
--- a/OsmAnd/no_translate.xml
+++ b/OsmAnd/no_translate.xml
@@ -11,7 +11,7 @@
10
true
+play_market -amazon -blackberry
- © OpenStreetMap
+ © OpenStreetMap
support@osmand.net
Display language
@@ -26,5 +26,10 @@
https://twitter.com/osmandapp
https://www.facebook.com/osmandapp
https://vk.com/osmandapp
+ Add
+ Edit
+ Delete
+ Reopen
+ items modified
diff --git a/OsmAnd/res/drawable-hdpi/image_text_osmand.png b/OsmAnd/res/drawable-hdpi/image_text_osmand.png
index eadfca79d7..a26b0faa2e 100644
Binary files a/OsmAnd/res/drawable-hdpi/image_text_osmand.png and b/OsmAnd/res/drawable-hdpi/image_text_osmand.png differ
diff --git a/OsmAnd/res/drawable-hdpi/image_text_osmand_inapp.png b/OsmAnd/res/drawable-hdpi/image_text_osmand_inapp.png
new file mode 100644
index 0000000000..28d9215f36
Binary files /dev/null and b/OsmAnd/res/drawable-hdpi/image_text_osmand_inapp.png differ
diff --git a/OsmAnd/res/drawable-hdpi/image_text_osmand_osmlive.png b/OsmAnd/res/drawable-hdpi/image_text_osmand_osmlive.png
new file mode 100644
index 0000000000..ef8e6b61b4
Binary files /dev/null and b/OsmAnd/res/drawable-hdpi/image_text_osmand_osmlive.png differ
diff --git a/OsmAnd/res/drawable-hdpi/image_text_osmand_plus.png b/OsmAnd/res/drawable-hdpi/image_text_osmand_plus.png
index c9660fcb54..4d8e665d1b 100644
Binary files a/OsmAnd/res/drawable-hdpi/image_text_osmand_plus.png and b/OsmAnd/res/drawable-hdpi/image_text_osmand_plus.png differ
diff --git a/OsmAnd/res/drawable-hdpi/image_text_osmand_plus_osmlive.png b/OsmAnd/res/drawable-hdpi/image_text_osmand_plus_osmlive.png
new file mode 100644
index 0000000000..6c00b7a4ff
Binary files /dev/null and b/OsmAnd/res/drawable-hdpi/image_text_osmand_plus_osmlive.png differ
diff --git a/OsmAnd/res/drawable-hdpi/map_bicycle_location_lost.png b/OsmAnd/res/drawable-hdpi/map_bicycle_location_lost.png
new file mode 100644
index 0000000000..bebc1fa6ac
Binary files /dev/null and b/OsmAnd/res/drawable-hdpi/map_bicycle_location_lost.png differ
diff --git a/OsmAnd/res/drawable-hdpi/map_bicycle_location_lost_night.png b/OsmAnd/res/drawable-hdpi/map_bicycle_location_lost_night.png
new file mode 100644
index 0000000000..9ded796ac4
Binary files /dev/null and b/OsmAnd/res/drawable-hdpi/map_bicycle_location_lost_night.png differ
diff --git a/OsmAnd/res/drawable-hdpi/map_car_location_lost.png b/OsmAnd/res/drawable-hdpi/map_car_location_lost.png
new file mode 100644
index 0000000000..7b80f695ae
Binary files /dev/null and b/OsmAnd/res/drawable-hdpi/map_car_location_lost.png differ
diff --git a/OsmAnd/res/drawable-hdpi/map_car_location_lost_night.png b/OsmAnd/res/drawable-hdpi/map_car_location_lost_night.png
new file mode 100644
index 0000000000..fba15e4b75
Binary files /dev/null and b/OsmAnd/res/drawable-hdpi/map_car_location_lost_night.png differ
diff --git a/OsmAnd/res/drawable-hdpi/map_default_location_lost.png b/OsmAnd/res/drawable-hdpi/map_default_location_lost.png
new file mode 100644
index 0000000000..4ff643f9cd
Binary files /dev/null and b/OsmAnd/res/drawable-hdpi/map_default_location_lost.png differ
diff --git a/OsmAnd/res/drawable-hdpi/map_default_location_lost_night.png b/OsmAnd/res/drawable-hdpi/map_default_location_lost_night.png
new file mode 100644
index 0000000000..7d097bbc6a
Binary files /dev/null and b/OsmAnd/res/drawable-hdpi/map_default_location_lost_night.png differ
diff --git a/OsmAnd/res/drawable-hdpi/map_pedestrian_location_lost.png b/OsmAnd/res/drawable-hdpi/map_pedestrian_location_lost.png
new file mode 100644
index 0000000000..cce0ef4dda
Binary files /dev/null and b/OsmAnd/res/drawable-hdpi/map_pedestrian_location_lost.png differ
diff --git a/OsmAnd/res/drawable-hdpi/map_pedestrian_location_lost_night.png b/OsmAnd/res/drawable-hdpi/map_pedestrian_location_lost_night.png
new file mode 100644
index 0000000000..5d3ec7b8c5
Binary files /dev/null and b/OsmAnd/res/drawable-hdpi/map_pedestrian_location_lost_night.png differ
diff --git a/OsmAnd/res/drawable-mdpi/image_text_osmand.png b/OsmAnd/res/drawable-mdpi/image_text_osmand.png
index db4838a5ab..a841937deb 100644
Binary files a/OsmAnd/res/drawable-mdpi/image_text_osmand.png and b/OsmAnd/res/drawable-mdpi/image_text_osmand.png differ
diff --git a/OsmAnd/res/drawable-mdpi/image_text_osmand_inapp.png b/OsmAnd/res/drawable-mdpi/image_text_osmand_inapp.png
new file mode 100644
index 0000000000..47d11ddd72
Binary files /dev/null and b/OsmAnd/res/drawable-mdpi/image_text_osmand_inapp.png differ
diff --git a/OsmAnd/res/drawable-mdpi/image_text_osmand_osmlive.png b/OsmAnd/res/drawable-mdpi/image_text_osmand_osmlive.png
new file mode 100644
index 0000000000..a52503e793
Binary files /dev/null and b/OsmAnd/res/drawable-mdpi/image_text_osmand_osmlive.png differ
diff --git a/OsmAnd/res/drawable-mdpi/image_text_osmand_plus.png b/OsmAnd/res/drawable-mdpi/image_text_osmand_plus.png
index 6976c1e62c..16b7a91f45 100644
Binary files a/OsmAnd/res/drawable-mdpi/image_text_osmand_plus.png and b/OsmAnd/res/drawable-mdpi/image_text_osmand_plus.png differ
diff --git a/OsmAnd/res/drawable-mdpi/image_text_osmand_plus_osmlive.png b/OsmAnd/res/drawable-mdpi/image_text_osmand_plus_osmlive.png
new file mode 100644
index 0000000000..036c19d1ee
Binary files /dev/null and b/OsmAnd/res/drawable-mdpi/image_text_osmand_plus_osmlive.png differ
diff --git a/OsmAnd/res/drawable-mdpi/map_bicycle_location_lost.png b/OsmAnd/res/drawable-mdpi/map_bicycle_location_lost.png
new file mode 100644
index 0000000000..6cc51190e7
Binary files /dev/null and b/OsmAnd/res/drawable-mdpi/map_bicycle_location_lost.png differ
diff --git a/OsmAnd/res/drawable-mdpi/map_bicycle_location_lost_night.png b/OsmAnd/res/drawable-mdpi/map_bicycle_location_lost_night.png
new file mode 100644
index 0000000000..aea1ded6a8
Binary files /dev/null and b/OsmAnd/res/drawable-mdpi/map_bicycle_location_lost_night.png differ
diff --git a/OsmAnd/res/drawable-mdpi/map_car_location_lost.png b/OsmAnd/res/drawable-mdpi/map_car_location_lost.png
new file mode 100644
index 0000000000..683b71d211
Binary files /dev/null and b/OsmAnd/res/drawable-mdpi/map_car_location_lost.png differ
diff --git a/OsmAnd/res/drawable-mdpi/map_car_location_lost_night.png b/OsmAnd/res/drawable-mdpi/map_car_location_lost_night.png
new file mode 100644
index 0000000000..4bcae2b836
Binary files /dev/null and b/OsmAnd/res/drawable-mdpi/map_car_location_lost_night.png differ
diff --git a/OsmAnd/res/drawable-mdpi/map_default_location_lost.png b/OsmAnd/res/drawable-mdpi/map_default_location_lost.png
new file mode 100644
index 0000000000..2282c4a44f
Binary files /dev/null and b/OsmAnd/res/drawable-mdpi/map_default_location_lost.png differ
diff --git a/OsmAnd/res/drawable-mdpi/map_default_location_lost_night.png b/OsmAnd/res/drawable-mdpi/map_default_location_lost_night.png
new file mode 100644
index 0000000000..9319b73dbd
Binary files /dev/null and b/OsmAnd/res/drawable-mdpi/map_default_location_lost_night.png differ
diff --git a/OsmAnd/res/drawable-mdpi/map_pedestrian_location_lost.png b/OsmAnd/res/drawable-mdpi/map_pedestrian_location_lost.png
new file mode 100644
index 0000000000..508891f25a
Binary files /dev/null and b/OsmAnd/res/drawable-mdpi/map_pedestrian_location_lost.png differ
diff --git a/OsmAnd/res/drawable-mdpi/map_pedestrian_location_lost_night.png b/OsmAnd/res/drawable-mdpi/map_pedestrian_location_lost_night.png
new file mode 100644
index 0000000000..d49881be8a
Binary files /dev/null and b/OsmAnd/res/drawable-mdpi/map_pedestrian_location_lost_night.png differ
diff --git a/OsmAnd/res/drawable-sw600dp-v21/first_splash_screen_free.xml b/OsmAnd/res/drawable-sw600dp-v21/first_splash_screen_free.xml
new file mode 100644
index 0000000000..b3d6f99388
--- /dev/null
+++ b/OsmAnd/res/drawable-sw600dp-v21/first_splash_screen_free.xml
@@ -0,0 +1,10 @@
+
+
+
+ -
+
+
+
\ No newline at end of file
diff --git a/OsmAnd/res/drawable-sw600dp-v21/first_splash_screen_free_dev.xml b/OsmAnd/res/drawable-sw600dp-v21/first_splash_screen_free_dev.xml
new file mode 100644
index 0000000000..b3d6f99388
--- /dev/null
+++ b/OsmAnd/res/drawable-sw600dp-v21/first_splash_screen_free_dev.xml
@@ -0,0 +1,10 @@
+
+
+
+ -
+
+
+
\ No newline at end of file
diff --git a/OsmAnd/res/drawable-sw600dp-v21/first_splash_screen_plus.xml b/OsmAnd/res/drawable-sw600dp-v21/first_splash_screen_plus.xml
new file mode 100644
index 0000000000..1dc65ed611
--- /dev/null
+++ b/OsmAnd/res/drawable-sw600dp-v21/first_splash_screen_plus.xml
@@ -0,0 +1,10 @@
+
+
+
+ -
+
+
+
\ No newline at end of file
diff --git a/OsmAnd/res/drawable-sw600dp/first_splash_screen_free.xml b/OsmAnd/res/drawable-sw600dp/first_splash_screen_free.xml
new file mode 100644
index 0000000000..20d4cde2ea
--- /dev/null
+++ b/OsmAnd/res/drawable-sw600dp/first_splash_screen_free.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/OsmAnd/res/drawable-sw600dp/first_splash_screen_free_dev.xml b/OsmAnd/res/drawable-sw600dp/first_splash_screen_free_dev.xml
new file mode 100644
index 0000000000..20d4cde2ea
--- /dev/null
+++ b/OsmAnd/res/drawable-sw600dp/first_splash_screen_free_dev.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/OsmAnd/res/drawable-sw600dp/first_splash_screen_plus.xml b/OsmAnd/res/drawable-sw600dp/first_splash_screen_plus.xml
new file mode 100644
index 0000000000..20d4cde2ea
--- /dev/null
+++ b/OsmAnd/res/drawable-sw600dp/first_splash_screen_plus.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/OsmAnd/res/drawable-xhdpi/image_text_osmand.png b/OsmAnd/res/drawable-xhdpi/image_text_osmand.png
index 806e1757af..c03b0e1574 100644
Binary files a/OsmAnd/res/drawable-xhdpi/image_text_osmand.png and b/OsmAnd/res/drawable-xhdpi/image_text_osmand.png differ
diff --git a/OsmAnd/res/drawable-xhdpi/image_text_osmand_inapp.png b/OsmAnd/res/drawable-xhdpi/image_text_osmand_inapp.png
new file mode 100644
index 0000000000..cb873548dd
Binary files /dev/null and b/OsmAnd/res/drawable-xhdpi/image_text_osmand_inapp.png differ
diff --git a/OsmAnd/res/drawable-xhdpi/image_text_osmand_osmlive.png b/OsmAnd/res/drawable-xhdpi/image_text_osmand_osmlive.png
new file mode 100644
index 0000000000..489600a585
Binary files /dev/null and b/OsmAnd/res/drawable-xhdpi/image_text_osmand_osmlive.png differ
diff --git a/OsmAnd/res/drawable-xhdpi/image_text_osmand_plus.png b/OsmAnd/res/drawable-xhdpi/image_text_osmand_plus.png
index 77ba70ff93..41fb71a2d1 100644
Binary files a/OsmAnd/res/drawable-xhdpi/image_text_osmand_plus.png and b/OsmAnd/res/drawable-xhdpi/image_text_osmand_plus.png differ
diff --git a/OsmAnd/res/drawable-xhdpi/image_text_osmand_plus_osmlive.png b/OsmAnd/res/drawable-xhdpi/image_text_osmand_plus_osmlive.png
new file mode 100644
index 0000000000..e75075562c
Binary files /dev/null and b/OsmAnd/res/drawable-xhdpi/image_text_osmand_plus_osmlive.png differ
diff --git a/OsmAnd/res/drawable-xhdpi/map_bicycle_location_lost.png b/OsmAnd/res/drawable-xhdpi/map_bicycle_location_lost.png
new file mode 100644
index 0000000000..fcaabf6ad0
Binary files /dev/null and b/OsmAnd/res/drawable-xhdpi/map_bicycle_location_lost.png differ
diff --git a/OsmAnd/res/drawable-xhdpi/map_bicycle_location_lost_night.png b/OsmAnd/res/drawable-xhdpi/map_bicycle_location_lost_night.png
new file mode 100644
index 0000000000..bab8271450
Binary files /dev/null and b/OsmAnd/res/drawable-xhdpi/map_bicycle_location_lost_night.png differ
diff --git a/OsmAnd/res/drawable-xhdpi/map_car_location_lost.png b/OsmAnd/res/drawable-xhdpi/map_car_location_lost.png
new file mode 100644
index 0000000000..3d8b63d148
Binary files /dev/null and b/OsmAnd/res/drawable-xhdpi/map_car_location_lost.png differ
diff --git a/OsmAnd/res/drawable-xhdpi/map_car_location_lost_night.png b/OsmAnd/res/drawable-xhdpi/map_car_location_lost_night.png
new file mode 100644
index 0000000000..0ce19dc964
Binary files /dev/null and b/OsmAnd/res/drawable-xhdpi/map_car_location_lost_night.png differ
diff --git a/OsmAnd/res/drawable-xhdpi/map_default_location_lost.png b/OsmAnd/res/drawable-xhdpi/map_default_location_lost.png
new file mode 100644
index 0000000000..224ab74273
Binary files /dev/null and b/OsmAnd/res/drawable-xhdpi/map_default_location_lost.png differ
diff --git a/OsmAnd/res/drawable-xhdpi/map_default_location_lost_night.png b/OsmAnd/res/drawable-xhdpi/map_default_location_lost_night.png
new file mode 100644
index 0000000000..b9db6a188c
Binary files /dev/null and b/OsmAnd/res/drawable-xhdpi/map_default_location_lost_night.png differ
diff --git a/OsmAnd/res/drawable-xhdpi/map_pedestrian_location_lost.png b/OsmAnd/res/drawable-xhdpi/map_pedestrian_location_lost.png
new file mode 100644
index 0000000000..dfd5c4c658
Binary files /dev/null and b/OsmAnd/res/drawable-xhdpi/map_pedestrian_location_lost.png differ
diff --git a/OsmAnd/res/drawable-xhdpi/map_pedestrian_location_lost_night.png b/OsmAnd/res/drawable-xhdpi/map_pedestrian_location_lost_night.png
new file mode 100644
index 0000000000..0aef4663d1
Binary files /dev/null and b/OsmAnd/res/drawable-xhdpi/map_pedestrian_location_lost_night.png differ
diff --git a/OsmAnd/res/drawable-xxhdpi/image_text_osmand.png b/OsmAnd/res/drawable-xxhdpi/image_text_osmand.png
index 309a305799..69a0ce8383 100644
Binary files a/OsmAnd/res/drawable-xxhdpi/image_text_osmand.png and b/OsmAnd/res/drawable-xxhdpi/image_text_osmand.png differ
diff --git a/OsmAnd/res/drawable-xxhdpi/image_text_osmand_inapp.png b/OsmAnd/res/drawable-xxhdpi/image_text_osmand_inapp.png
new file mode 100644
index 0000000000..75ba136c05
Binary files /dev/null and b/OsmAnd/res/drawable-xxhdpi/image_text_osmand_inapp.png differ
diff --git a/OsmAnd/res/drawable-xxhdpi/image_text_osmand_osmlive.png b/OsmAnd/res/drawable-xxhdpi/image_text_osmand_osmlive.png
new file mode 100644
index 0000000000..124d8871a0
Binary files /dev/null and b/OsmAnd/res/drawable-xxhdpi/image_text_osmand_osmlive.png differ
diff --git a/OsmAnd/res/drawable-xxhdpi/image_text_osmand_plus.png b/OsmAnd/res/drawable-xxhdpi/image_text_osmand_plus.png
index cf45e3f02e..724321f1ed 100644
Binary files a/OsmAnd/res/drawable-xxhdpi/image_text_osmand_plus.png and b/OsmAnd/res/drawable-xxhdpi/image_text_osmand_plus.png differ
diff --git a/OsmAnd/res/drawable-xxhdpi/image_text_osmand_plus_osmlive.png b/OsmAnd/res/drawable-xxhdpi/image_text_osmand_plus_osmlive.png
new file mode 100644
index 0000000000..91f2c4ab5d
Binary files /dev/null and b/OsmAnd/res/drawable-xxhdpi/image_text_osmand_plus_osmlive.png differ
diff --git a/OsmAnd/res/drawable-xxhdpi/map_bicycle_location_lost.png b/OsmAnd/res/drawable-xxhdpi/map_bicycle_location_lost.png
new file mode 100644
index 0000000000..35f3ecb1a4
Binary files /dev/null and b/OsmAnd/res/drawable-xxhdpi/map_bicycle_location_lost.png differ
diff --git a/OsmAnd/res/drawable-xxhdpi/map_bicycle_location_lost_night.png b/OsmAnd/res/drawable-xxhdpi/map_bicycle_location_lost_night.png
new file mode 100644
index 0000000000..79b685dcc7
Binary files /dev/null and b/OsmAnd/res/drawable-xxhdpi/map_bicycle_location_lost_night.png differ
diff --git a/OsmAnd/res/drawable-xxhdpi/map_car_location_lost.png b/OsmAnd/res/drawable-xxhdpi/map_car_location_lost.png
new file mode 100644
index 0000000000..bfd71b27a2
Binary files /dev/null and b/OsmAnd/res/drawable-xxhdpi/map_car_location_lost.png differ
diff --git a/OsmAnd/res/drawable-xxhdpi/map_car_location_lost_night.png b/OsmAnd/res/drawable-xxhdpi/map_car_location_lost_night.png
new file mode 100644
index 0000000000..46a316ec88
Binary files /dev/null and b/OsmAnd/res/drawable-xxhdpi/map_car_location_lost_night.png differ
diff --git a/OsmAnd/res/drawable-xxhdpi/map_default_location_lost.png b/OsmAnd/res/drawable-xxhdpi/map_default_location_lost.png
new file mode 100644
index 0000000000..5ad2db4c02
Binary files /dev/null and b/OsmAnd/res/drawable-xxhdpi/map_default_location_lost.png differ
diff --git a/OsmAnd/res/drawable-xxhdpi/map_default_location_lost_night.png b/OsmAnd/res/drawable-xxhdpi/map_default_location_lost_night.png
new file mode 100644
index 0000000000..e396e0e66c
Binary files /dev/null and b/OsmAnd/res/drawable-xxhdpi/map_default_location_lost_night.png differ
diff --git a/OsmAnd/res/drawable-xxhdpi/map_pedestrian_location_lost.png b/OsmAnd/res/drawable-xxhdpi/map_pedestrian_location_lost.png
new file mode 100644
index 0000000000..5724c476a9
Binary files /dev/null and b/OsmAnd/res/drawable-xxhdpi/map_pedestrian_location_lost.png differ
diff --git a/OsmAnd/res/drawable-xxhdpi/map_pedestrian_location_lost_night.png b/OsmAnd/res/drawable-xxhdpi/map_pedestrian_location_lost_night.png
new file mode 100644
index 0000000000..1a4dd14e4a
Binary files /dev/null and b/OsmAnd/res/drawable-xxhdpi/map_pedestrian_location_lost_night.png differ
diff --git a/OsmAnd/res/drawable-xxxhdpi/image_text_osmand.png b/OsmAnd/res/drawable-xxxhdpi/image_text_osmand.png
index 129874b153..828bcf45e8 100644
Binary files a/OsmAnd/res/drawable-xxxhdpi/image_text_osmand.png and b/OsmAnd/res/drawable-xxxhdpi/image_text_osmand.png differ
diff --git a/OsmAnd/res/drawable-xxxhdpi/image_text_osmand_inapp.png b/OsmAnd/res/drawable-xxxhdpi/image_text_osmand_inapp.png
new file mode 100644
index 0000000000..93b8f6c6e4
Binary files /dev/null and b/OsmAnd/res/drawable-xxxhdpi/image_text_osmand_inapp.png differ
diff --git a/OsmAnd/res/drawable-xxxhdpi/image_text_osmand_osmlive.png b/OsmAnd/res/drawable-xxxhdpi/image_text_osmand_osmlive.png
new file mode 100644
index 0000000000..51032033f8
Binary files /dev/null and b/OsmAnd/res/drawable-xxxhdpi/image_text_osmand_osmlive.png differ
diff --git a/OsmAnd/res/drawable-xxxhdpi/image_text_osmand_plus.png b/OsmAnd/res/drawable-xxxhdpi/image_text_osmand_plus.png
index d74b7a9278..1201d0ece8 100644
Binary files a/OsmAnd/res/drawable-xxxhdpi/image_text_osmand_plus.png and b/OsmAnd/res/drawable-xxxhdpi/image_text_osmand_plus.png differ
diff --git a/OsmAnd/res/drawable-xxxhdpi/image_text_osmand_plus_osmlive.png b/OsmAnd/res/drawable-xxxhdpi/image_text_osmand_plus_osmlive.png
new file mode 100644
index 0000000000..c7d0569a95
Binary files /dev/null and b/OsmAnd/res/drawable-xxxhdpi/image_text_osmand_plus_osmlive.png differ
diff --git a/OsmAnd/res/drawable/first_splash_screen_free.xml b/OsmAnd/res/drawable/first_splash_screen_free.xml
index aec9198e4d..b3d6f99388 100644
--- a/OsmAnd/res/drawable/first_splash_screen_free.xml
+++ b/OsmAnd/res/drawable/first_splash_screen_free.xml
@@ -2,9 +2,9 @@
- -
+
-
\ No newline at end of file
diff --git a/OsmAnd/res/drawable/first_splash_screen_free_dev.xml b/OsmAnd/res/drawable/first_splash_screen_free_dev.xml
index aec9198e4d..b3d6f99388 100644
--- a/OsmAnd/res/drawable/first_splash_screen_free_dev.xml
+++ b/OsmAnd/res/drawable/first_splash_screen_free_dev.xml
@@ -2,9 +2,9 @@
- -
+
-
\ No newline at end of file
diff --git a/OsmAnd/res/drawable/first_splash_screen_plus.xml b/OsmAnd/res/drawable/first_splash_screen_plus.xml
index 278da90a36..1dc65ed611 100644
--- a/OsmAnd/res/drawable/first_splash_screen_plus.xml
+++ b/OsmAnd/res/drawable/first_splash_screen_plus.xml
@@ -2,9 +2,9 @@
- -
+
-
\ No newline at end of file
diff --git a/OsmAnd/res/values-ar/strings.xml b/OsmAnd/res/values-ar/strings.xml
index 25997ee862..dd65ad522f 100644
--- a/OsmAnd/res/values-ar/strings.xml
+++ b/OsmAnd/res/values-ar/strings.xml
@@ -2569,8 +2569,8 @@
آلي
خيارات مواقف السيارات
شكرا لكم لاقتناء النسخة الكاملة من أوسماند !
- السرعة
- الأمان
+ قبول الطرق الرئيسية
+ تفضيل الشوارع الجانبية
المسار
إختر مجلد المسار
المسارات
diff --git a/OsmAnd/res/values-b+hsb/strings.xml b/OsmAnd/res/values-b+hsb/strings.xml
index 62fa29ee7e..19b95217f4 100644
--- a/OsmAnd/res/values-b+hsb/strings.xml
+++ b/OsmAnd/res/values-b+hsb/strings.xml
@@ -904,4 +904,5 @@
Składowanska karta
Format koordinatow
Format za geografiske koordinaty
-
+Mapillary
+
diff --git a/OsmAnd/res/values-ca/strings.xml b/OsmAnd/res/values-ca/strings.xml
index d1387ef04b..40143131e3 100644
--- a/OsmAnd/res/values-ca/strings.xml
+++ b/OsmAnd/res/values-ca/strings.xml
@@ -701,7 +701,7 @@ Memòria proporcional %4$s MB (límit de l\'Android %5$s MB, Dalvik %6$s MB).Destinació %1$s
Destinacions
La fita %1$s és massa lluny de la carretera més propera.
- Heu arribat a la vostra fita
+ Heu arribat a la vostra destinació intermèdia
Afegeix com una fita
Fita
El punt final és massa lluny de la carretera més propera.
diff --git a/OsmAnd/res/values-cs/strings.xml b/OsmAnd/res/values-cs/strings.xml
index 143609a864..90e4aba12d 100644
--- a/OsmAnd/res/values-cs/strings.xml
+++ b/OsmAnd/res/values-cs/strings.xml
@@ -2554,9 +2554,9 @@ Pokud potřebujete pomoci s aplikací OsmAnd, prosím kontaktujte naši podporu
Kopcovitý
Méně kopcovitý
Rovinatý
- Rychlý
+ Preferovat hlavní silnice
Vyvážený
- Bezpečný
+ Preferovat vedlejší silnice
Priorita terénu: rovinatý nebo kopcovitý
Svah
Berbersky
diff --git a/OsmAnd/res/values-da/strings.xml b/OsmAnd/res/values-da/strings.xml
index 38a06dda80..76084ad41c 100644
--- a/OsmAnd/res/values-da/strings.xml
+++ b/OsmAnd/res/values-da/strings.xml
@@ -2651,7 +2651,7 @@ Repræsenterer område: %1$s x %2$s
Kuperet
Mindre kuperet
Fladt
- Foretræk større veje
+ Accepter større veje
Balanceret
Foretrækk sideveje
Foretruknet terræn: fladt eller kuperet
@@ -2808,6 +2808,6 @@ Tidligere destination bliver sidste mellemliggende punkt.
Genoptag/pause navigation
Tryk på knappen pause navigation eller genoptag, hvis den allerede var sat på pause.
Vis Afslut navigation dialog
- Start/slut Navigation
- Tryk på knappen for at starte navigationen eller stoppe den, hvis den allerede var begyndt.
+ Start/slut navigation
+ Tryk på knappen for at starte navigation eller stoppe, hvis den allerede var begyndt.
diff --git a/OsmAnd/res/values-de/phrases.xml b/OsmAnd/res/values-de/phrases.xml
index 9d96d2c699..e3328e9a8f 100644
--- a/OsmAnd/res/values-de/phrases.xml
+++ b/OsmAnd/res/values-de/phrases.xml
@@ -3410,4 +3410,9 @@
Säugetiere
Fische
+ Tierannahme
+ Bestimmung
+
+Eigentümer
+
diff --git a/OsmAnd/res/values-eo/strings.xml b/OsmAnd/res/values-eo/strings.xml
index 5c72bd0c99..2351028a42 100644
--- a/OsmAnd/res/values-eo/strings.xml
+++ b/OsmAnd/res/values-eo/strings.xml
@@ -2487,9 +2487,9 @@ Indikas lokon: %1$s x %2$s"
Malebena
Malpli ebena
Ebena
- Rapida
+ Akcepti ĉefajn vojojn
Ekvilibra
- Sekura
+ Preferi flankajn vojojn
Elekti nivel-ombruman glatecon
Dankon al ci por aĉeti la plenan version de OsmAnd!
Parkumadaj agordoj
diff --git a/OsmAnd/res/values-es-rAR/strings.xml b/OsmAnd/res/values-es-rAR/strings.xml
index c98dd1df7d..5c7dbb7c20 100644
--- a/OsmAnd/res/values-es-rAR/strings.xml
+++ b/OsmAnd/res/values-es-rAR/strings.xml
@@ -2463,9 +2463,9 @@ Proporciona un código completo
Empinado
Poco empinado
Plano (llanura)
- Velocidad
+ Preferir caminos principales
Equilibrado
- Seguridad
+ Preferir caminos secundarios
Terreno preferido: llano o empinado
No enviar estadísticas de uso anónimas de la aplicación
OsmAnd recopila información acerca de las secciones que abres en la aplicación. No recopilamos datos de ubicación, ingresos en la aplicación o datos relacionados con las áreas que visualizas, buscas o descargas.
diff --git a/OsmAnd/res/values-es-rUS/strings.xml b/OsmAnd/res/values-es-rUS/strings.xml
index e2787c24e2..0b3cdcebcc 100644
--- a/OsmAnd/res/values-es-rUS/strings.xml
+++ b/OsmAnd/res/values-es-rUS/strings.xml
@@ -2463,9 +2463,9 @@ Proporciona un código completo
Empinado
Poco empinado
Plano (llanura)
- Velocidad
+ Preferir caminos principales
Equilibrado
- Seguridad
+ Preferir caminos secundarios
Terreno preferido: llano o empinado
No enviar estadísticas de uso anónimas de la aplicación
OsmAnd recopila información acerca de las secciones que abres en la aplicación. No recopilamos datos de ubicación, ingresos en la aplicación o datos relacionados con las áreas que visualizas, buscas o descargas.
diff --git a/OsmAnd/res/values-es/strings.xml b/OsmAnd/res/values-es/strings.xml
index 91cb5836b3..acbdbbc4c2 100644
--- a/OsmAnd/res/values-es/strings.xml
+++ b/OsmAnd/res/values-es/strings.xml
@@ -2436,9 +2436,9 @@ Por favor proporciona un código completo
Empinado
Poco empinado
Llano
- Velocidad
+ Preferir carreteras principales
Equilibrado
- Seguridad
+ Preferir carreteras secundarias
Terreno preferido: llano o empinado
Bereber
No enviar estadísticas de uso anónimas de la aplicación
diff --git a/OsmAnd/res/values-fr/strings.xml b/OsmAnd/res/values-fr/strings.xml
index 8d1237db47..c45dd02f5a 100644
--- a/OsmAnd/res/values-fr/strings.xml
+++ b/OsmAnd/res/values-fr/strings.xml
@@ -2644,9 +2644,9 @@ représentant la zone : %1$s x %2$s
Vallonné
Moins vallonné
Plat
- Rapide
+ Privilégier les routes principales
Équilibré
- Sûre
+ Privilégier les routes secondaires
Merci d\'avoir acheté la version complète d\'OsmAnd !
Sélectionnez les préférences de relief
Choix de stationnement
diff --git a/OsmAnd/res/values-he/strings.xml b/OsmAnd/res/values-he/strings.xml
index 648d9c9acc..148d536e23 100644
--- a/OsmAnd/res/values-he/strings.xml
+++ b/OsmAnd/res/values-he/strings.xml
@@ -1213,4 +1213,42 @@
הקלדת שם משתמש
הצגת תמונות שנוספו על ידי משתמש מסוים.
שם משתמש
+ אפשר לסנן תמונות לפי השולח או לפי תאריך. המסננים חלים רק על תקריב בגודל מסוים.
+ מד זווית
+ הרשאות
+ ל־OsmAnd אין אפשרות לייבא את הקובץ. נא לוודא של־OsmAnd יש הרשאה לקרוא קבצים מהמיקום הזה.
+ המרחק תוקן
+ הפסקה/המשך בניווט
+ יש ללחוץ על כפתור זה כדי להפסיק את הניווט או כדי להמשיך אם הוא כבר הופסק.
+ הצגת דו־שיח סיום הניווט
+ התחלה/סיום הניווט
+ יש ללחוץ על כפתור זה כדי להתחיל בניווט או כדי לעצור אותו אם הוא כבר החל.
+ אחסון המסלולים המוקלטים בתת־תיקיות לפי חודש ההקלטה (למשל: 2017-01).
+ תמונת Mapillary
+ פתיחת Mapillary
+ התקנה
+ שיפור כיסוי התמונות עם Mapillary
+ ניתן לצלם סדרת תמונות משלך ולצרף אותם למיקום הזה במפה.
+\n
+\nכדי לעשות זאת עליך להתקין את היישום של Mapillary מחנות היישומים Google Play.
+ תמונות מקוונות
+ הוספת תמונות
+ אין לנו תמונות במיקום זה
+ ניתן לתרום עם נופים ברמת הרחוב למיקום זה עם Mapillary.
+ וידג׳ט Mapillary
+ מאפשר לך לתרום במהירות ל־Mapillary
+ תמונות מקוונות ברמת רחוב לכולם. היכרות עם מקומות חדשים, שיתוף פעולה וצילום העולם.
+ Mapillary
+ תמונות ברמת הרחוב לכולם. להכיר מקומות, לשתף פעולה ולצלם את העולם.
+ היעד שלך ממוקם באיזור עם גישה פרטית לאפשר גישה לכבישים הפרטיים לצורך טיול זה?
+ חיפוש מחדש
+ הגדלת רדיוס החיפוש
+ לא נמצא כלום :(
+ יש לשנות את הביטוי לחיפוש או להגדיל את רדיוס החיפוש
+ הצגה/הסתרה של הערות OSM
+ הצגת הערות OSM
+ הסתרת הערות OSM
+ לחיצה על כפתור הפעולה תגרום להצגת או הסתרה של הערות OSM על המפה.
+ מסודר לפי מרחק
+ חיפוש במועדפים
diff --git a/OsmAnd/res/values-hu/phrases.xml b/OsmAnd/res/values-hu/phrases.xml
index f9c9dc2fd2..4c3a7aada6 100644
--- a/OsmAnd/res/values-hu/phrases.xml
+++ b/OsmAnd/res/values-hu/phrases.xml
@@ -201,7 +201,7 @@
Villanyszerelő
Kertész
Ékszerész
- Lakatos
+ Zárlakatos
Kulcsmásoló
Fényképész
Fotólabor
@@ -456,7 +456,7 @@
Úszás
Tenisz
Régészeti lelőhely
- Csatamező
+ Csatatér
Határkő
Történelmi ágyú
Rúnakő
@@ -1358,7 +1358,7 @@
Emléktábla
Szobor
Kő
- Sztélé
+ Kopjafa, sztélé
Mellszobor
Jármű
Obeliszk
@@ -1689,7 +1689,7 @@
Műalkotás típusa: mozaik
Műalkotás típusa: dombormű
Műalkotás típusa: graffiti
- Műalkotás típusa: sztélé
+ Műalkotás típusa: kopjafa, sztélé
Műalkotás típusa: szökőkút
Szélesség
@@ -3410,4 +3410,20 @@
Tulajdonos
-
+Fogadott állatok
+ Cél
+
+Vadon élő
+ Ló
+ Emlős
+ Hal
+
+ Örökbeadás
+ Nem adnak örökbe
+ Szabadon engedés
+ Nem engedik szabadon
+
+ Űrrepülőtér
+
+Zsilipmedence
+
diff --git a/OsmAnd/res/values-it/strings.xml b/OsmAnd/res/values-it/strings.xml
index 679eabcde7..534860b160 100644
--- a/OsmAnd/res/values-it/strings.xml
+++ b/OsmAnd/res/values-it/strings.xml
@@ -1,4 +1,5 @@
-
+
+
Sovrapposizioni fluorescenti
Usa colori fluorescenti per visualizzare tracce e percorsi
Modifiche offline
@@ -1220,7 +1221,7 @@ I dati globali (fra i 70 gradi nord e 70 gradi sud) sono basati su misurazioni d
Barca
Aereo
Disegno della mappa
- Scegli fra le modalità d\'uso disponibili dell\'applicazione
+ Scegli i profili d\'uso del l\'applicazione da rendere visibili
Profili applicazione
Mare
@@ -1327,14 +1328,11 @@ I dati globali (fra i 70 gradi nord e 70 gradi sud) sono basati su misurazioni d
Formato non valido: %s
ID univoco del dispositivo
Configura le impostazioni di monitoraggio e imposta il canale di monitoraggio personale
- "Questo componente aggiuntivo fornisce parzialmente le funzionalità del monitoraggio di OpenStreetMap, vedi http://osmo.mobi.
-
-
-Puoi tracciare in tempo reale tutti i dispositivi di un gruppo di partecipanti. Puoi anche visualizzare i punti e le tracce caricate dal gruppo a cui appartieni.
-
-
-Il gruppo che non è stato rimosso da mesi viene allineato con le tue regole per la creazione di gruppi nel sito OsMo.mobi
- "
+ Questo componente aggiuntivo fornisce parzialmente le funzionalità del monitoraggio di OpenStreetMap, vedi http://osmo.mobi.
+\n
+\nPuoi tracciare in tempo reale tutti i dispositivi di un gruppo di partecipanti. Puoi anche visualizzare i punti e le tracce caricate dal gruppo a cui appartieni.
+\n
+\nIl gruppo che non è stato rimosso da mesi viene allineato con le tue regole per la creazione di gruppi nel sito OsMo.mobi
Monitoraggio OpenStreetMap
OsMO
Solo manualmente (tap sulla freccia)
@@ -1702,7 +1700,7 @@ Le tracce registrate possono essere condivise con i tuoi amici o essere usate pe
Per visualizzare le mappe per lo sci è necessario scaricare la mappa speciale offline
Per visualizzare le mappe nautiche è necessario scaricare la mappa speciale offline
Finitura della pista
- "Libera %1$s "
+ Libera %1$s
Memoria dispositivo
Piste da sci
Solo strade
@@ -2002,7 +2000,7 @@ Attivando questa vista lo stile della mappa diventerà \'Inverno e sci\', mostra
Sei sicuro?
Tutte le modifiche non salvate andranno perse. Continuare?
Arresta la simulazione del percorso
- Simula utilizzando un GPX registrato o una percorso calcolato
+ Simula la posizione utilizzando un GPX registrato o una percorso calcolato
%1$s download rimanenti
Informazioni preferite
Aggiungi preferito
@@ -2141,33 +2139,31 @@ Attivando questa vista lo stile della mappa diventerà \'Inverno e sci\', mostra
Specifica il corretto tipo di PDI o salta questo passaggio
Evita le scale
Evita le scale
- "
- • Nuova interfaccia utente sensibile al contesto per le località selezionate sulla mappa e negli altri schermi
-
-
- • La schermata della mappa è avviata direttamente se non è selezionato \"Mostra il pannello di controllo all\'avvio\"
-
-
- • Configura quali e come vengono visualizzate le voci nel pannello di controllo
-
-
- • Salta il pannello di controllo se preferisci i controlli dell\'app tipo menù
-
-
- • Per scaricare mappe, regioni è possibile selezionarle direttamente tappando sulla mappa mondiale
-
-
- • La ricerca di PDI ora supporta richieste più specifiche
-
-
- • Migliorata la funzionalità modifica di PDI e OSM
-
-
- • Riviste la struttura e l\'interfaccia di download dei dati della mappa
-
-
- e altro…
- "
+ \\022 Nuova interfaccia utente sensibile al contesto per le località selezionate sulla mappa e negli altri schermi
+\n
+\n
+\n • La schermata della mappa è avviata direttamente se non è selezionato \"Mostra il pannello di controllo all\'avvio\"
+\n
+\n
+\n • Configura quali e come vengono visualizzate le voci nel pannello di controllo
+\n
+\n
+\n • Salta il pannello di controllo se preferisci i controlli dell\'app tipo menù
+\n
+\n
+\n • Per scaricare mappe, regioni è possibile selezionarle direttamente tappando sulla mappa mondiale
+\n
+\n
+\n • La ricerca di PDI ora supporta richieste più specifiche
+\n
+\n
+\n • Migliorata la funzionalità modifica di PDI e OSM
+\n
+\n
+\n • Riviste la struttura e l\'interfaccia di download dei dati della mappa
+\n
+\n
+\n e altro…
C\'è una nuova opzione per controllare l\'app attraverso il pannello di controllo personalizzabile o tramite il menù statico. La tua scelta può sempre essere modificata nelle impostazioni del pannello di controllo.
Vicino
Nascondi
@@ -2689,9 +2685,9 @@ Rappresenta l\'area: %1$s x %2$s
Collinoso
Meno collinoso
Pianeggiante
- Velocità
+ Preferisci le strade principali
Bilanciato
- Sicuro
+ Preferisci byways
Terreno preferito: pianeggiante o collinoso
Seleziona la fluttuazione della quota
Automatica
@@ -2851,4 +2847,25 @@ Copertura e qualità approssimativamente:
Salva le tracce registrate in cartelle mensili
Salva le tracce registrate in sottocartelle per mese di registrazione (come 2017-01).
Reimposta
-
\ No newline at end of file
+ Premi il pulsante per mettere in pausa la navigazione, oppure per riprenderla se è già in pausa.
+ Mostra la finestra di dialogo Fine
+ Inizio/Fine Navigazione
+ Premi questo pulsante per avviare la navigazione, o per fermarla se già avviata.
+ Rosa traslucido
+ Media
+ %1$d di %2$d
+ Guadagno/Perdita di quota
+ Tempo in movimento
+ Max/Min
+ Min/Max
+ Riprendi/Sospendi la Navigazione
+ \\022 Componente aggiuntivo Mapillary con immagini stradali
+\n
+\n • Widget righello per la misurazione della distanza
+\n
+\n • Informazioni dettagliate e suddivisore delle tue tracce GPX
+\n
+\n • Altre migliorie e correzioni di errori
+\n
+\n
+
diff --git a/OsmAnd/res/values-sc/phrases.xml b/OsmAnd/res/values-sc/phrases.xml
index 68315ef36f..bb4962abde 100644
--- a/OsmAnd/res/values-sc/phrases.xml
+++ b/OsmAnd/res/values-sc/phrases.xml
@@ -2637,4 +2637,9 @@
Servìtzios
Casta de mototzicleta
+Animales atzetados
+ Punna
+
+Portu ispatziale
+
diff --git a/OsmAnd/res/values-sc/strings.xml b/OsmAnd/res/values-sc/strings.xml
index bf01f4299e..1863ce368c 100644
--- a/OsmAnd/res/values-sc/strings.xml
+++ b/OsmAnd/res/values-sc/strings.xml
@@ -2559,16 +2559,16 @@ Pro praghere iscrie su còdighe intreu
As a iscantzellare %1$d puntu/os. Seguru ses?
Puntos importantes in custa àndala
Annanghe una cartella noa
- Puntos de colare in cust\'àndala
+ Bortadas de colare in cust\'àndala
Caladòrgia
Bèrberu
Terrinos preferidos: in paris o cun cùcuros
Cùcuros/montigros
Pagos cùcuros
Terrinu in paris
- Lestru
+ Privilègia sas istradas printzipales
Bilantziadu
- Seguru
+ Privilègia sas istradas segundàrias
Valore de variatzione de s\'artària
Gràtzias pro àere comporadu sa versione intrea de OsmAnd!
No imbies informatziones anònimas a pitzu de s\'impreu de s\'aplicatzione
@@ -2710,4 +2710,9 @@ Pro praghere iscrie su còdighe intreu
Rosa translùtzidu
Mèdiu
Ascendente/Discendente
+ Faghe sighire/Pone in pàusa su nàvigu
+ Incarca custu butone pro pònnere in pàusa su nàvigu, o pru lu sighire si est giai in pàusa.
+ Ammustra sa ventana pro sa fine de su nàvigu
+ Incumintza/Acaba su nàvigu
+ Incarca custu butone pro incumintzare su nàvigu, o pro l\'acabare si est giai incumintzadu.
diff --git a/OsmAnd/res/values-uk/strings.xml b/OsmAnd/res/values-uk/strings.xml
index 14d5cdaf71..01dfe5db80 100644
--- a/OsmAnd/res/values-uk/strings.xml
+++ b/OsmAnd/res/values-uk/strings.xml
@@ -2667,8 +2667,8 @@
Шрифти для мапи
Правосторонній рух
Збалансований
- Безпечний
- Швидкісний
+ Надавати перевагу путівцям
+ Враховувати основні дороги
Анімувати моє місце розташування
Задіяти анімацію мого місця розташування під час навігації
Не показувати повідомлення при запуску
@@ -2944,4 +2944,9 @@
\n
\n
Напівпрозорий рожевий
+ Відновити/призупинити навігацію
+ Натисніть цю кнопку, щоб призупинити навігацію або відновити її, якщо вона вже була призупинена.
+ Показати вікно, щоб завершити навігацію
+ Початок/завершення навігації
+ Натисніть цю кнопку, щоб запустити навігацію або зупинити її, якщо вона вже була запущена.
diff --git a/OsmAnd/res/values-zh-rTW/strings.xml b/OsmAnd/res/values-zh-rTW/strings.xml
index 1dd1998079..d73e9cdf8d 100644
--- a/OsmAnd/res/values-zh-rTW/strings.xml
+++ b/OsmAnd/res/values-zh-rTW/strings.xml
@@ -2643,9 +2643,9 @@ OsmAnd (Automated Navigation Directions) 是一個地圖和導航的應用程式
丘陵
小的丘陵
平地
- 速度
+ 採用主要道路
均衡
- 安全性
+ 較喜歡小路
偏愛的地形:平地或丘陵
感謝您購買完整版的 OsmAnd!
選擇高度起伏
diff --git a/OsmAnd/res/values/sizes.xml b/OsmAnd/res/values/sizes.xml
index 0a922ea0a4..eee5a0487a 100644
--- a/OsmAnd/res/values/sizes.xml
+++ b/OsmAnd/res/values/sizes.xml
@@ -1,5 +1,7 @@
+ 48dp
+
36dp
15dp
32dp
@@ -10,7 +12,7 @@
360dp
56dp
78dp
-
+
2dp
15dp
14dp
@@ -30,15 +32,15 @@
4dp
4dp
0dp
-
+
16dp
8dp
-
+
16dp
10dp
12dp
8dp
-
+
24dp
10dp
13dp
@@ -50,8 +52,8 @@
3dp
14dp
6dp
-
-
+
+
16dp
48dp
@@ -69,8 +71,8 @@
120dp
9dp
78dp
-
-
+
+
87dp
57dp
85dp
@@ -83,8 +85,8 @@
6dp
6dp
100dp
-
-
+
+
2dp
2dp
3dp
@@ -94,9 +96,9 @@
306dp
330dp
100dp
-
-
-
+
+
+
23sp
15sp
18sp
@@ -104,7 +106,7 @@
1sp
3sp
2dp
-
+
2dp
6dp
diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml
index a038f3c946..3ddb7b2509 100644
--- a/OsmAnd/res/values/strings.xml
+++ b/OsmAnd/res/values/strings.xml
@@ -119,7 +119,7 @@
Hilly
Less hilly
Flat
- Prefer major roads
+ Accept major roads
Balanced
Prefer byways
Preferred terrain: flat or hilly
diff --git a/OsmAnd/src/net/osmand/SecondSplashScreenFragment.java b/OsmAnd/src/net/osmand/SecondSplashScreenFragment.java
index 76b01d9d78..2492c90db7 100644
--- a/OsmAnd/src/net/osmand/SecondSplashScreenFragment.java
+++ b/OsmAnd/src/net/osmand/SecondSplashScreenFragment.java
@@ -18,11 +18,12 @@ import net.osmand.plus.R;
import net.osmand.plus.Version;
import net.osmand.plus.activities.MapActivity;
import net.osmand.plus.helpers.AndroidUiHelper;
+import net.osmand.plus.inapp.InAppHelper;
public class SecondSplashScreenFragment extends Fragment {
public static final String TAG = "SecondSplashScreenFragment";
public static boolean SHOW = true;
- private static final int SECOND_SPLASH_TIME_OUT = 5000;
+ private static final int SECOND_SPLASH_TIME_OUT = 8000;
private boolean started = false;
private FragmentActivity activity;
private OsmandApplication app;
@@ -95,9 +96,19 @@ public class SecondSplashScreenFragment extends Fragment {
logoLayoutParams.addRule(RelativeLayout.CENTER_HORIZONTAL);
ImageView text = new ImageView(activity);
if (Version.isFreeVersion(app)) {
- text.setImageDrawable(getResources().getDrawable(R.drawable.image_text_osmand));
+ if ((InAppHelper.isSubscribedToLiveUpdates() && InAppHelper.isFullVersionPurchased()) || InAppHelper.isSubscribedToLiveUpdates()) {
+ text.setImageDrawable(getResources().getDrawable(R.drawable.image_text_osmand_osmlive));
+ } else if (InAppHelper.isFullVersionPurchased()) {
+ text.setImageDrawable(getResources().getDrawable(R.drawable.image_text_osmand_inapp));
+ } else {
+ text.setImageDrawable(getResources().getDrawable(R.drawable.image_text_osmand));
+ }
} else if (Version.isPaidVersion(app) || Version.isDeveloperVersion(app)) {
- text.setImageDrawable(getResources().getDrawable(R.drawable.image_text_osmand_plus));
+ if (InAppHelper.isSubscribedToLiveUpdates()) {
+ text.setImageDrawable(getResources().getDrawable(R.drawable.image_text_osmand_plus_osmlive));
+ } else {
+ text.setImageDrawable(getResources().getDrawable(R.drawable.image_text_osmand_plus));
+ }
}
RelativeLayout.LayoutParams textLayoutParams = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT);
textLayoutParams.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);
@@ -142,18 +153,14 @@ public class SecondSplashScreenFragment extends Fragment {
}
if (!started) {
started = true;
+ SecondSplashScreenFragment.SHOW = false;
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
- if (activity instanceof MapActivity) {
- activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED);
- if (app.getSettings().MAP_SCREEN_ORIENTATION.get() != activity.getRequestedOrientation()) {
- activity.setRequestedOrientation(app.getSettings().MAP_SCREEN_ORIENTATION.get());
- // can't return from this method we are not sure if activity will be recreated or not
- }
+ if (activity instanceof MapActivity && !((MapActivity) activity).isActivityDestroyed()) {
+ ((MapActivity)activity).dismissSecondSplashScreen();
}
- activity.getSupportFragmentManager().beginTransaction().remove(SecondSplashScreenFragment.this).commitAllowingStateLoss();
}
}, SECOND_SPLASH_TIME_OUT);
}
diff --git a/OsmAnd/src/net/osmand/plus/FavouritesDbHelper.java b/OsmAnd/src/net/osmand/plus/FavouritesDbHelper.java
index cc5fdc0c96..5d9e0db424 100644
--- a/OsmAnd/src/net/osmand/plus/FavouritesDbHelper.java
+++ b/OsmAnd/src/net/osmand/plus/FavouritesDbHelper.java
@@ -663,7 +663,7 @@ public class FavouritesDbHelper {
if (conn.getVersion() == 0 || DATABASE_VERSION != conn.getVersion()) {
if (readonly) {
conn.close();
- conn = context.getSQLiteAPI().getOrCreateDatabase(FAVOURITE_DB_NAME, readonly);
+ conn = context.getSQLiteAPI().getOrCreateDatabase(FAVOURITE_DB_NAME, false);
}
if (conn.getVersion() == 0) {
onCreate(conn);
diff --git a/OsmAnd/src/net/osmand/plus/GPXDatabase.java b/OsmAnd/src/net/osmand/plus/GPXDatabase.java
index 5799532663..d81cbfca91 100644
--- a/OsmAnd/src/net/osmand/plus/GPXDatabase.java
+++ b/OsmAnd/src/net/osmand/plus/GPXDatabase.java
@@ -154,7 +154,7 @@ public class GPXDatabase {
if (version == 0 || DB_VERSION != version) {
if (readonly) {
conn.close();
- conn = context.getSQLiteAPI().getOrCreateDatabase(DB_NAME, readonly);
+ conn = context.getSQLiteAPI().getOrCreateDatabase(DB_NAME, false);
}
version = conn.getVersion();
conn.setVersion(DB_VERSION);
@@ -443,9 +443,9 @@ public class GPXDatabase {
public List getItems() {
List items = new ArrayList<>();
SQLiteConnection db = openConnection(true);
- if (db != null){
+ if (db != null) {
try {
- SQLiteCursor query = db.rawQuery(GPX_TABLE_SELECT , null);
+ SQLiteCursor query = db.rawQuery(GPX_TABLE_SELECT, null);
if (query.moveToFirst()) {
do {
items.add(readItem(query));
diff --git a/OsmAnd/src/net/osmand/plus/GpxSelectionHelper.java b/OsmAnd/src/net/osmand/plus/GpxSelectionHelper.java
index 5fcb91e40d..1bb939a116 100644
--- a/OsmAnd/src/net/osmand/plus/GpxSelectionHelper.java
+++ b/OsmAnd/src/net/osmand/plus/GpxSelectionHelper.java
@@ -528,9 +528,10 @@ public class GpxSelectionHelper {
public void processPoints() {
update();
this.processedPointsToDisplay = gpxFile.proccessPoints();
- if (this.processedPointsToDisplay.isEmpty()) {
- this.processedPointsToDisplay = gpxFile.processRoutePoints();
- routePoints = !this.processedPointsToDisplay.isEmpty();
+ List processedRoutePointsToDisplay = gpxFile.processRoutePoints();
+ if (!processedRoutePointsToDisplay.isEmpty()) {
+ this.processedPointsToDisplay.addAll(processedRoutePointsToDisplay);
+ routePoints = !processedRoutePointsToDisplay.isEmpty();
}
}
diff --git a/OsmAnd/src/net/osmand/plus/OsmandSettings.java b/OsmAnd/src/net/osmand/plus/OsmandSettings.java
index 9dd1a5d01a..2aa1d11e26 100644
--- a/OsmAnd/src/net/osmand/plus/OsmandSettings.java
+++ b/OsmAnd/src/net/osmand/plus/OsmandSettings.java
@@ -752,7 +752,7 @@ public class OsmandSettings {
public final OsmandPreference DRIVING_REGION = new EnumIntPreference(
"default_driving_region", DrivingRegion.EUROPE_ASIA, DrivingRegion.values()) {
protected boolean setValue(Object prefs, DrivingRegion val) {
- if (val != null) {
+ if (val != null && !METRIC_SYSTEM_CHANGED_MANUALLY.get()) {
METRIC_SYSTEM.set(val.defMetrics);
}
return super.setValue(prefs, val);
@@ -783,6 +783,8 @@ public class OsmandSettings {
;
}.makeGlobal().cache();
+ public final CommonPreference METRIC_SYSTEM_CHANGED_MANUALLY = new BooleanPreference("metric_system_changed_manually", false).makeGlobal();
+
// this value string is synchronized with settings_pref.xml preference name
// cache of metrics constants as they are used very often
public final OsmandPreference METRIC_SYSTEM = new EnumIntPreference(
diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java
index c01d74dc5c..201f98b293 100644
--- a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java
+++ b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java
@@ -189,6 +189,8 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven
private boolean mIsDestroyed = false;
private InAppHelper inAppHelper;
+ private SecondSplashScreenFragment secondSplashScreenFragment;
+
@Override
public void onCreate(Bundle savedInstanceState) {
setRequestedOrientation(AndroidUiHelper.getScreenOrientation(this));
@@ -692,7 +694,8 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven
}
FirstUsageWelcomeFragment.SHOW = false;
if (SecondSplashScreenFragment.SHOW) {
- getSupportFragmentManager().beginTransaction().add(R.id.fragmentContainer, new SecondSplashScreenFragment(), SecondSplashScreenFragment.TAG).commitAllowingStateLoss();
+ secondSplashScreenFragment = new SecondSplashScreenFragment();
+ getSupportFragmentManager().beginTransaction().add(R.id.fragmentContainer, secondSplashScreenFragment, SecondSplashScreenFragment.TAG).commitAllowingStateLoss();
} else {
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED);
if (settings.MAP_SCREEN_ORIENTATION.get() != getRequestedOrientation()) {
@@ -700,7 +703,16 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven
// can't return from this method we are not sure if activity will be recreated or not
}
}
+ }
+
+ public void dismissSecondSplashScreen() {
SecondSplashScreenFragment.SHOW = false;
+ getSupportFragmentManager().beginTransaction().remove(secondSplashScreenFragment).commitAllowingStateLoss();
+ setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED);
+ if (app.getSettings().MAP_SCREEN_ORIENTATION.get() != getRequestedOrientation()) {
+ setRequestedOrientation(app.getSettings().MAP_SCREEN_ORIENTATION.get());
+ // can't return from this method we are not sure if activity will be recreated or not
+ }
}
@Override
@@ -1094,8 +1106,12 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven
if (registry.getCurrentSelectedRenderer() != newRenderer) {
registry.setCurrentSelectedRender(newRenderer);
app.getResourceManager().getRenderer().clearCache();
+ mapView.resetDefaultColor();
mapView.refreshMap(true);
+ } else {
+ mapView.resetDefaultColor();
}
+
return null;
}
diff --git a/OsmAnd/src/net/osmand/plus/activities/SettingsGeneralActivity.java b/OsmAnd/src/net/osmand/plus/activities/SettingsGeneralActivity.java
index 688354f63e..b07ab4427d 100644
--- a/OsmAnd/src/net/osmand/plus/activities/SettingsGeneralActivity.java
+++ b/OsmAnd/src/net/osmand/plus/activities/SettingsGeneralActivity.java
@@ -516,6 +516,8 @@ public class SettingsGeneralActivity extends SettingsBaseActivity implements OnR
restartApp();
} else if (id.equals(settings.OSMAND_THEME.getId())) {
restartApp();
+ } else if (id.equals(settings.METRIC_SYSTEM.getId())) {
+ settings.METRIC_SYSTEM_CHANGED_MANUALLY.set(true);
} else {
updateAllSettings();
}
diff --git a/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNotesPlugin.java b/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNotesPlugin.java
index 3b181dee32..7103e2457a 100644
--- a/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNotesPlugin.java
+++ b/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNotesPlugin.java
@@ -386,7 +386,7 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
rot -= 360;
}
int abs = (int) (Math.abs(rot) * 100.0);
- String rotString = abs / 100f + "";
+ String rotString = abs + "/100";
setAttribute.invoke(exInstance, "GPSImgDirection", rotString);
}
if (loc != null && loc.hasAltitude()) {
diff --git a/OsmAnd/src/net/osmand/plus/development/SettingsDevelopmentActivity.java b/OsmAnd/src/net/osmand/plus/development/SettingsDevelopmentActivity.java
index 124b19839b..200dc58369 100644
--- a/OsmAnd/src/net/osmand/plus/development/SettingsDevelopmentActivity.java
+++ b/OsmAnd/src/net/osmand/plus/development/SettingsDevelopmentActivity.java
@@ -78,6 +78,7 @@ public class SettingsDevelopmentActivity extends SettingsBaseActivity {
getMyApplication().getSettings().FIRST_MAP_IS_DOWNLOADED.set(false);
getMyApplication().getSettings().MAPILLARY_FIRST_DIALOG_SHOWN.set(false);
getMyApplication().getSettings().WEBGL_SUPPORTED.set(true);
+ getMyApplication().getSettings().METRIC_SYSTEM_CHANGED_MANUALLY.set(false);
getMyApplication().showToastMessage(R.string.shared_string_ok);
return true;
}
diff --git a/OsmAnd/src/net/osmand/plus/download/DownloadActivityType.java b/OsmAnd/src/net/osmand/plus/download/DownloadActivityType.java
index 57262294ee..d23510ced0 100644
--- a/OsmAnd/src/net/osmand/plus/download/DownloadActivityType.java
+++ b/OsmAnd/src/net/osmand/plus/download/DownloadActivityType.java
@@ -309,6 +309,11 @@ public class DownloadActivityType {
String downloadName = basename.substring(0, ind - 1) + basename.substring(ind + "addresses-nationwide".length());
return osmandRegions.getLocaleName(downloadName, includingParent) +
" "+ ctx.getString(R.string.index_item_nation_addresses);
+ } else if (basename.startsWith("Depth_")) {
+ final int extInd = basename.indexOf("osmand_ext");
+ String downloadName = extInd == -1 ? basename.substring(6, basename.length()).replace('_', ' ')
+ : basename.substring(6, extInd).replace('_', ' ');
+ return ctx.getString(R.string.download_depth_countours) + " " + downloadName;
}
return osmandRegions.getLocaleName(basename, includingParent);
diff --git a/OsmAnd/src/net/osmand/plus/download/DownloadResourceGroup.java b/OsmAnd/src/net/osmand/plus/download/DownloadResourceGroup.java
index f47a829397..e1ea3a0c60 100644
--- a/OsmAnd/src/net/osmand/plus/download/DownloadResourceGroup.java
+++ b/OsmAnd/src/net/osmand/plus/download/DownloadResourceGroup.java
@@ -41,10 +41,12 @@ public class DownloadResourceGroup {
// headers with font items
FONTS_HEADER(R.string.fonts_header),
// headers with resources
+ NAUTICAL_MAPS_GROUP(R.string.nautical_maps),
OTHER_MAPS_GROUP(R.string.download_select_map_types),
OTHER_GROUP(R.string.other_menu_group),
SUBREGIONS(R.string.regions),
// screen items
+ NAUTICAL_MAPS(R.string.nautical_maps),
VOICE_TTS(R.string.index_name_tts_voice),
FONTS(R.string.fonts_header),
VOICE_REC(R.string.index_name_voice),
@@ -60,7 +62,7 @@ public class DownloadResourceGroup {
public boolean isScreen() {
return this == WORLD || this == REGION || this == VOICE_TTS
- || this == VOICE_REC || this == OTHER_MAPS || this == FONTS;
+ || this == VOICE_REC || this == OTHER_MAPS || this == FONTS || this == NAUTICAL_MAPS;
}
public String getDefaultId() {
@@ -72,7 +74,8 @@ public class DownloadResourceGroup {
}
public boolean containsIndexItem() {
- return isHeader() && this != SUBREGIONS && this != OTHER_GROUP && this != OTHER_MAPS_GROUP;
+ return isHeader() && this != SUBREGIONS && this != OTHER_GROUP && this != OTHER_MAPS_GROUP
+ && this != NAUTICAL_MAPS_GROUP;
}
public boolean isHeader() {
@@ -80,7 +83,7 @@ public class DownloadResourceGroup {
|| this == WORLD_MAPS || this == REGION_MAPS || this == OTHER_GROUP
|| this == HILLSHADE_HEADER || this == SRTM_HEADER
|| this == OTHER_MAPS_HEADER || this == OTHER_MAPS_GROUP
- || this == FONTS_HEADER || this == NAUTICAL_MAPS_HEADER;
+ || this == FONTS_HEADER || this == NAUTICAL_MAPS_HEADER || this == NAUTICAL_MAPS_GROUP;
}
public static String getVoiceTTSId() {
diff --git a/OsmAnd/src/net/osmand/plus/download/DownloadResources.java b/OsmAnd/src/net/osmand/plus/download/DownloadResources.java
index d3861e244a..5cfbd18cf0 100644
--- a/OsmAnd/src/net/osmand/plus/download/DownloadResources.java
+++ b/OsmAnd/src/net/osmand/plus/download/DownloadResources.java
@@ -264,7 +264,10 @@ public class DownloadResources extends DownloadResourceGroup {
DownloadResourceGroup fonts = new DownloadResourceGroup(otherGroup, DownloadResourceGroupType.FONTS_HEADER);
DownloadResourceGroup worldMaps = new DownloadResourceGroup(this, DownloadResourceGroupType.WORLD_MAPS);
- DownloadResourceGroup nauticalMaps = new DownloadResourceGroup(this, DownloadResourceGroupType.NAUTICAL_MAPS_HEADER);
+
+ DownloadResourceGroup nauticalMapsGroup = new DownloadResourceGroup(this, DownloadResourceGroupType.NAUTICAL_MAPS_GROUP);
+ DownloadResourceGroup nauticalMapsScreen = new DownloadResourceGroup(nauticalMapsGroup, DownloadResourceGroupType.NAUTICAL_MAPS);
+ DownloadResourceGroup nauticalMaps = new DownloadResourceGroup(nauticalMapsGroup, DownloadResourceGroupType.NAUTICAL_MAPS_HEADER);
Map > groupByRegion = new LinkedHashMap>();
OsmandRegions regs = app.getRegions();
@@ -346,7 +349,11 @@ public class DownloadResources extends DownloadResourceGroup {
// 2. if there is no subregions and there only 1 index item it could be merged to the level up - objection there is no such maps
// 3. if hillshade/srtm is disabled, all maps from inner level could be combined into 1
addGroup(worldMaps);
- addGroup(nauticalMaps);
+
+ nauticalMapsScreen.addGroup(nauticalMaps);
+ nauticalMapsGroup.addGroup(nauticalMapsScreen);
+ addGroup(nauticalMapsGroup);
+
if (otherMaps.size() > 0) {
addGroup(otherMapsGroup);
}
diff --git a/OsmAnd/src/net/osmand/plus/helpers/DatabaseHelper.java b/OsmAnd/src/net/osmand/plus/helpers/DatabaseHelper.java
index 019f717569..17b02c70eb 100644
--- a/OsmAnd/src/net/osmand/plus/helpers/DatabaseHelper.java
+++ b/OsmAnd/src/net/osmand/plus/helpers/DatabaseHelper.java
@@ -50,7 +50,7 @@ public class DatabaseHelper {
if (conn.getVersion() == 0 || DB_VERSION != conn.getVersion()) {
if (readonly) {
conn.close();
- conn = app.getSQLiteAPI().getOrCreateDatabase(DB_NAME, true);
+ conn = app.getSQLiteAPI().getOrCreateDatabase(DB_NAME, false);
}
if (conn.getVersion() == 0) {
conn.setVersion(DB_VERSION);
diff --git a/OsmAnd/src/net/osmand/plus/monitoring/LiveMonitoringHelper.java b/OsmAnd/src/net/osmand/plus/monitoring/LiveMonitoringHelper.java
index 55f6c35de4..784d9e96ea 100644
--- a/OsmAnd/src/net/osmand/plus/monitoring/LiveMonitoringHelper.java
+++ b/OsmAnd/src/net/osmand/plus/monitoring/LiveMonitoringHelper.java
@@ -180,7 +180,7 @@ public class LiveMonitoringHelper {
urlConnection.setReadTimeout(15000);
// allow certificates where hostnames doesn't match CN
- if (url.getProtocol() == "https") {
+ if (url.getProtocol().equals("https")) {
((HttpsURLConnection) urlConnection).setHostnameVerifier(
new HostnameVerifier() {
public boolean verify(String host, SSLSession session) {
diff --git a/OsmAnd/src/net/osmand/plus/myplaces/TrackSegmentFragment.java b/OsmAnd/src/net/osmand/plus/myplaces/TrackSegmentFragment.java
index 6efec111b1..74f2273db3 100644
--- a/OsmAnd/src/net/osmand/plus/myplaces/TrackSegmentFragment.java
+++ b/OsmAnd/src/net/osmand/plus/myplaces/TrackSegmentFragment.java
@@ -134,7 +134,6 @@ public class TrackSegmentFragment extends OsmAndListFragment {
private int defPointColor;
private Paint paintIcon;
private Bitmap pointSmall;
- private GpxDisplayItem generalDisplayItem;
private ImageView imageView;
private RotatedTileBox rotatedTileBox;
@@ -279,17 +278,20 @@ public class TrackSegmentFragment extends OsmAndListFragment {
imageView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
- LatLon location = new LatLon(generalDisplayItem.locationStart.lat,
- generalDisplayItem.locationStart.lon);
- final OsmandSettings settings = app.getSettings();
- settings.setMapLocationToShow(location.getLatitude(), location.getLongitude(),
- settings.getLastKnownMapZoom(),
- new PointDescription(PointDescription.POINT_TYPE_WPT, generalDisplayItem.name),
- false,
- getRect()
- );
+ WptPt pointToShow = getGpx() != null ? getGpx().findPointToShow() : null;
+ if (pointToShow != null) {
+ LatLon location = new LatLon(pointToShow.getLatitude(),
+ pointToShow.getLongitude());
+ final OsmandSettings settings = app.getSettings();
+ settings.setMapLocationToShow(location.getLatitude(), location.getLongitude(),
+ settings.getLastKnownMapZoom(),
+ new PointDescription(PointDescription.POINT_TYPE_WPT, getGpxDataItem().getFile().getName()),
+ false,
+ getRect()
+ );
- MapActivity.launchMapActivityMoveToTop(getActivity());
+ MapActivity.launchMapActivityMoveToTop(getActivity());
+ }
}
});
final View splitColorView = headerView.findViewById(R.id.split_color_view);
@@ -489,15 +491,17 @@ public class TrackSegmentFragment extends OsmAndListFragment {
}
public void updateSplitView() {
- SelectedGpxFile sf = app.getSelectedGpxHelper().selectGpxFile(getGpx(), ((SwitchCompat)headerView.findViewById(R.id.showOnMapToggle)).isChecked(), false);
- final List groups = getDisplayGroups();
- if (groups.size() > 0) {
- updateSplit(groups, ((SwitchCompat)headerView.findViewById(R.id.showOnMapToggle)).isChecked() ? sf : null);
- if (getGpxDataItem() != null) {
- updateSplitInDatabase();
+ if (getGpx() != null) {
+ SelectedGpxFile sf = app.getSelectedGpxHelper().selectGpxFile(getGpx(), ((SwitchCompat)headerView.findViewById(R.id.showOnMapToggle)).isChecked(), false);
+ final List groups = getDisplayGroups();
+ if (groups.size() > 0) {
+ updateSplit(groups, ((SwitchCompat)headerView.findViewById(R.id.showOnMapToggle)).isChecked() ? sf : null);
+ if (getGpxDataItem() != null) {
+ updateSplitInDatabase();
+ }
}
+ updateSplitIntervalView(headerView.findViewById(R.id.split_interval_view));
}
- updateSplitIntervalView(headerView.findViewById(R.id.split_interval_view));
}
private void refreshTrackBitmap() {
@@ -856,9 +860,6 @@ public class TrackSegmentFragment extends OsmAndListFragment {
pager = (WrapContentHeightViewPager) row.findViewById(R.id.pager);
}
GpxDisplayItem item = getItem(position);
- if (position == 0) {
- generalDisplayItem = item;
- }
if (item != null) {
pager.setAdapter(new GPXItemPagerAdapter(tabLayout, item));
if (create) {
diff --git a/OsmAnd/src/net/osmand/plus/osmedit/EditPoiDialogFragment.java b/OsmAnd/src/net/osmand/plus/osmedit/EditPoiDialogFragment.java
index 7855c932f5..188915c41e 100644
--- a/OsmAnd/src/net/osmand/plus/osmedit/EditPoiDialogFragment.java
+++ b/OsmAnd/src/net/osmand/plus/osmedit/EditPoiDialogFragment.java
@@ -432,6 +432,7 @@ public class EditPoiDialogFragment extends BaseOsmAndDialogFragment {
}
}
String poiTypeTag = editPoiData.getTagValues().get(EditPoiData.POI_TYPE_TAG);
+ String comment = "";
if (poiTypeTag != null) {
final PoiType poiType = editPoiData.getAllTranslatedSubTypes().get(poiTypeTag.trim().toLowerCase());
if (poiType != null) {
@@ -448,8 +449,10 @@ public class EditPoiDialogFragment extends BaseOsmAndDialogFragment {
if (offlineEdit && !Algorithms.isEmpty(poiTypeTag)) {
node.putTagNoLC(EditPoiData.POI_TYPE_TAG, poiTypeTag);
}
- }
- commitNode(action, node, mOpenstreetmapUtil.getEntityInfo(node.getId()), "", false,
+ String actionString = action == OsmPoint.Action.CREATE ? getString(R.string.default_changeset_add) : getString(R.string.default_changeset_edit);
+ comment = actionString + " " + poiTypeTag;
+ }
+ commitNode(action, node, mOpenstreetmapUtil.getEntityInfo(node.getId()), comment, false,
new CallbackWithObject() {
@Override
diff --git a/OsmAnd/src/net/osmand/plus/osmedit/dialogs/SendPoiDialogFragment.java b/OsmAnd/src/net/osmand/plus/osmedit/dialogs/SendPoiDialogFragment.java
index 72890060f2..7f88d51d03 100644
--- a/OsmAnd/src/net/osmand/plus/osmedit/dialogs/SendPoiDialogFragment.java
+++ b/OsmAnd/src/net/osmand/plus/osmedit/dialogs/SendPoiDialogFragment.java
@@ -13,12 +13,14 @@ import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.EditText;
+import net.osmand.osm.PoiType;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.OsmandPlugin;
import net.osmand.plus.OsmandSettings;
import net.osmand.plus.R;
import net.osmand.plus.activities.MapActivity;
import net.osmand.plus.dialogs.ProgressDialogFragment;
+import net.osmand.plus.osmedit.EditPoiData;
import net.osmand.plus.osmedit.OpenstreetmapPoint;
import net.osmand.plus.osmedit.OsmBugsLayer;
import net.osmand.plus.osmedit.OsmEditingPlugin;
@@ -26,24 +28,30 @@ import net.osmand.plus.osmedit.OsmEditsUploadListener;
import net.osmand.plus.osmedit.OsmEditsUploadListenerHelper;
import net.osmand.plus.osmedit.OsmPoint;
import net.osmand.plus.osmedit.UploadOpenstreetmapPointAsyncTask;
+import net.osmand.util.Algorithms;
+import java.util.HashMap;
import java.util.Map;
public class SendPoiDialogFragment extends DialogFragment {
public static final String TAG = "SendPoiDialogFragment";
public static final String OPENSTREETMAP_POINT = "openstreetmap_point";
public static final String POI_UPLOADER_TYPE = "poi_uploader_type";
- private static String comment;
+ private OsmPoint[] poi;
public enum PoiUploaderType {
SIMPLE,
FRAGMENT
}
+ private OsmandApplication getMyApplication() {
+ return (OsmandApplication) getActivity().getApplication();
+ }
+
@NonNull
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
- final OsmPoint[] poi = (OsmPoint[]) getArguments().getSerializable(OPENSTREETMAP_POINT);
+ poi = (OsmPoint[]) getArguments().getSerializable(OPENSTREETMAP_POINT);
final PoiUploaderType poiUploaderType = PoiUploaderType.valueOf(getArguments().getString(POI_UPLOADER_TYPE, PoiUploaderType.SIMPLE.name()));
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
View view = getActivity().getLayoutInflater().inflate(R.layout.send_poi_dialog, null);
@@ -56,7 +64,6 @@ public class SendPoiDialogFragment extends DialogFragment {
final View passwordLabel = view.findViewById(R.id.osm_user_password_label);
final CheckBox closeChangeSetCheckBox =
(CheckBox) view.findViewById(R.id.close_change_set_checkbox);
- messageEditText.setText(comment);
final OsmandSettings settings = ((OsmandApplication) getActivity().getApplication())
.getSettings();
userNameEditText.setText(settings.USER_NAME.get());
@@ -69,6 +76,7 @@ public class SendPoiDialogFragment extends DialogFragment {
break;
}
}
+ messageEditText.setText(createDefaultChangeSet());
final boolean hasPOI = hasPoiGroup;
messageLabel.setVisibility(hasPOI ? View.VISIBLE : View.GONE);
messageEditText.setVisibility(hasPOI ? View.VISIBLE : View.GONE);
@@ -97,9 +105,9 @@ public class SendPoiDialogFragment extends DialogFragment {
@Override
public void onClick(DialogInterface dialog, int which) {
if (progressDialogPoiUploader != null) {
- comment = messageEditText.getText().toString();
settings.USER_NAME.set(userNameEditText.getText().toString());
settings.USER_PASSWORD.set(passwordEditText.getText().toString());
+ String comment = messageEditText.getText().toString();
if (comment.length() > 0) {
for (OsmPoint osmPoint : poi) {
if (osmPoint.getGroup() == OsmPoint.Group.POI) {
@@ -127,6 +135,111 @@ public class SendPoiDialogFragment extends DialogFragment {
return fragment;
}
+ private String createDefaultChangeSet() {
+ Map allTranslatedSubTypes = getMyApplication().getPoiTypes().getAllTranslatedNames(true);
+ Map addGroup = new HashMap<>();
+ Map editGroup = new HashMap<>();
+ Map deleteGroup = new HashMap<>();
+ Map reopenGroup = new HashMap<>();
+ String comment = "";
+ for (OsmPoint p : poi) {
+ if (p.getGroup() == OsmPoint.Group.POI) {
+ OsmPoint.Action action = p.getAction();
+ String type = ((OpenstreetmapPoint) p).getEntity().getTag(EditPoiData.POI_TYPE_TAG);
+ PoiType localizedPoiType = allTranslatedSubTypes.get(type.toLowerCase().trim());
+ if (localizedPoiType != null) {
+ type = Algorithms.capitalizeFirstLetter(localizedPoiType.getKeyName().replace('_', ' '));
+ }
+ if (action == OsmPoint.Action.CREATE) {
+ if (!addGroup.containsKey(type)) {
+ addGroup.put(type, 1);
+ } else {
+ addGroup.put(type, addGroup.get(type) + 1);
+ }
+ } else if (action == OsmPoint.Action.MODIFY) {
+ if (!editGroup.containsKey(type)) {
+ editGroup.put(type, 1);
+ } else {
+ editGroup.put(type, editGroup.get(type) + 1);
+ }
+ } else if (action == OsmPoint.Action.DELETE) {
+ if (!deleteGroup.containsKey(type)) {
+ deleteGroup.put(type, 1);
+ } else {
+ deleteGroup.put(type, deleteGroup.get(type) + 1);
+ }
+ } else if (action == OsmPoint.Action.REOPEN) {
+ if (!reopenGroup.containsKey(type)) {
+ reopenGroup.put(type, 1);
+ } else {
+ reopenGroup.put(type, reopenGroup.get(type) + 1);
+ }
+ }
+ }
+ }
+ int modifiedItemsOutOfLimit = 0;
+ boolean stringModifiedIfExceeded = false;
+ for (int i = 0; i < 4; i++) {
+ String action;
+ Map group;
+ switch (i) {
+ case 0:
+ action = getString(R.string.default_changeset_add);
+ group = addGroup;
+ break;
+ case 1:
+ action = getString(R.string.default_changeset_edit);
+ group = editGroup;
+ break;
+ case 2:
+ action = getString(R.string.default_changeset_delete);
+ group = deleteGroup;
+ break;
+ case 3:
+ action = getString(R.string.default_changeset_reopen);;
+ group = reopenGroup;
+ break;
+ default:
+ action = "";
+ group = new HashMap<>();
+ }
+
+ if (!group.isEmpty()) {
+ if (modifiedItemsOutOfLimit == 0) {
+ comment = comment.concat(action).concat(" ");
+ }
+ int pos = 0;
+ for (Map.Entry entry : group.entrySet()) {
+ String type = entry.getKey();
+ int quantity = entry.getValue();
+ if (comment.length() > 200) {
+ modifiedItemsOutOfLimit += quantity;
+ if (!stringModifiedIfExceeded) {
+ if (pos == 0) {
+ comment = comment.substring(0, comment.length() - action.length() - 3).concat("; ");
+ } else {
+ comment = comment.substring(0, comment.length() - 2).concat("; ");
+ }
+ stringModifiedIfExceeded = true;
+ }
+ } else {
+ comment = comment.concat(quantity == 1 ? "" : quantity + " ").concat(type + ", ");
+ }
+ pos++;
+ }
+ if (modifiedItemsOutOfLimit == 0) {
+ comment = comment.substring(0, comment.length() - 2).concat("; ");
+ }
+ }
+ }
+ if (modifiedItemsOutOfLimit != 0) {
+ comment = comment.concat(modifiedItemsOutOfLimit + " ").concat(getString(R.string.items_modified)).concat(".");
+ } else if (!comment.equals("")){
+ comment = comment.substring(0, comment.length() - 2).concat(".");
+ }
+ return comment;
+ }
+
public interface ProgressDialogPoiUploader {
void showProgressDialog(OsmPoint[] points, boolean closeChangeSet, boolean anonymously);
}
diff --git a/OsmAnd/src/net/osmand/plus/poi/PoiFiltersHelper.java b/OsmAnd/src/net/osmand/plus/poi/PoiFiltersHelper.java
index f6578e61ee..4ca7d456eb 100644
--- a/OsmAnd/src/net/osmand/plus/poi/PoiFiltersHelper.java
+++ b/OsmAnd/src/net/osmand/plus/poi/PoiFiltersHelper.java
@@ -1,5 +1,7 @@
package net.osmand.plus.poi;
+import android.support.annotation.NonNull;
+
import net.osmand.osm.AbstractPoiType;
import net.osmand.osm.MapPoiTypes;
import net.osmand.osm.PoiCategory;
@@ -12,15 +14,9 @@ import net.osmand.plus.api.SQLiteAPI.SQLiteCursor;
import net.osmand.plus.api.SQLiteAPI.SQLiteStatement;
import net.osmand.util.Algorithms;
-import android.support.annotation.NonNull;
-import android.util.ArraySet;
-
-import java.lang.reflect.Array;
-import java.text.Collator;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
-import java.util.Comparator;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedHashMap;
@@ -198,7 +194,7 @@ public class PoiFiltersHelper {
}
public List getTopDefinedPoiFilters() {
- if (cacheTopStandardFilters == null) {
+// if (cacheTopStandardFilters == null) {
List top = new ArrayList();
// user defined
top.addAll(getUserDefinedPoiFilters());
@@ -213,7 +209,7 @@ public class PoiFiltersHelper {
}
Collections.sort(top);
cacheTopStandardFilters = top;
- }
+// }
List result = new ArrayList();
result.addAll(cacheTopStandardFilters);
result.add(getShowAllPOIFilter());
@@ -406,7 +402,7 @@ public class PoiFiltersHelper {
if (conn.getVersion() == 0 || DATABASE_VERSION != conn.getVersion()) {
if (readonly) {
conn.close();
- conn = context.getSQLiteAPI().getOrCreateDatabase(DATABASE_NAME, readonly);
+ conn = context.getSQLiteAPI().getOrCreateDatabase(DATABASE_NAME, false);
}
if (conn.getVersion() == 0) {
conn.setVersion(DATABASE_VERSION);
diff --git a/OsmAnd/src/net/osmand/plus/poi/PoiUIFilter.java b/OsmAnd/src/net/osmand/plus/poi/PoiUIFilter.java
index 196be1f19e..e7d4e82846 100644
--- a/OsmAnd/src/net/osmand/plus/poi/PoiUIFilter.java
+++ b/OsmAnd/src/net/osmand/plus/poi/PoiUIFilter.java
@@ -26,7 +26,6 @@ import net.osmand.util.OpeningHoursParser;
import net.osmand.util.OpeningHoursParser.OpeningHours;
import java.util.ArrayList;
-import java.util.Arrays;
import java.util.Calendar;
import java.util.Collections;
import java.util.HashMap;
@@ -261,7 +260,7 @@ public class PoiUIFilter implements SearchPoiTypeFilter, Comparable
}
}
}
- List amenities = searchAmenitiesInternal(top / 2 + bottom / 2, left / 2 + right / 2,
+ List amenities = searchAmenitiesInternal(top / 2 + bottom / 2, left / 2 + right / 2,
top, bottom, left, right, zoom, matcher);
results.addAll(amenities);
return results;
@@ -573,10 +572,20 @@ public class PoiUIFilter implements SearchPoiTypeFilter, Comparable
}
public void combineWithPoiFilter(PoiUIFilter f) {
- acceptedTypes.putAll(f.acceptedTypes);
+ putAllAcceptedTypes(f.acceptedTypes);
poiAdditionals.putAll(f.poiAdditionals);
}
+ private void putAllAcceptedTypes(Map> types) {
+ for (PoiCategory category : types.keySet()) {
+ if (acceptedTypes.containsKey(category)) {
+ acceptedTypes.get(category).addAll(types.get(category));
+ } else {
+ acceptedTypes.put(category, types.get(category));
+ }
+ }
+ }
+
public void combineWithPoiFilters(Set filters) {
for (PoiUIFilter f : filters) {
combineWithPoiFilter(f);
diff --git a/OsmAnd/src/net/osmand/plus/views/OsmandMapTileView.java b/OsmAnd/src/net/osmand/plus/views/OsmandMapTileView.java
index da4a3e5630..5dd5750aaf 100644
--- a/OsmAnd/src/net/osmand/plus/views/OsmandMapTileView.java
+++ b/OsmAnd/src/net/osmand/plus/views/OsmandMapTileView.java
@@ -29,6 +29,7 @@ import android.view.WindowManager;
import android.widget.Toast;
import net.osmand.PlatformUtil;
+import net.osmand.SecondSplashScreenFragment;
import net.osmand.access.AccessibilityActionsProvider;
import net.osmand.core.android.MapRendererView;
import net.osmand.data.LatLon;
@@ -47,6 +48,9 @@ import net.osmand.plus.activities.MapActivity;
import net.osmand.plus.helpers.TwoFingerTapDetector;
import net.osmand.plus.views.MultiTouchSupport.MultiTouchZoomListener;
import net.osmand.plus.views.OsmandMapLayer.DrawSettings;
+import net.osmand.render.RenderingRuleSearchRequest;
+import net.osmand.render.RenderingRuleStorageProperties;
+import net.osmand.render.RenderingRulesStorage;
import net.osmand.util.MapUtils;
import org.apache.commons.logging.Log;
@@ -61,6 +65,7 @@ public class OsmandMapTileView implements IMapDownloaderCallback {
private static final int MAP_FORCE_REFRESH_MESSAGE = OsmAndConstants.UI_HANDLER_MAP_VIEW + 5;
private static final int BASE_REFRESH_MESSAGE = OsmAndConstants.UI_HANDLER_MAP_VIEW + 3;
protected final static int LOWEST_ZOOM_TO_ROTATE = 9;
+ private static final int MAP_DEFAULT_COLOR = 0xffebe7e4;
private boolean MEASURE_FPS = false;
private FPSMeasurement main = new FPSMeasurement();
private FPSMeasurement additional = new FPSMeasurement();
@@ -68,6 +73,7 @@ public class OsmandMapTileView implements IMapDownloaderCallback {
private Activity activity;
private OsmandApplication application;
protected OsmandSettings settings = null;
+ private Integer defaultColor = null;
private class FPSMeasurement {
int fpsMeasureCount = 0;
@@ -103,6 +109,10 @@ public class OsmandMapTileView implements IMapDownloaderCallback {
public boolean onPressEvent(PointF point);
}
+ public int getDefaultColor() {
+ return defaultColor;
+ }
+
protected static final Log LOG = PlatformUtil.getLog(OsmandMapTileView.class);
@@ -164,6 +174,7 @@ public class OsmandMapTileView implements IMapDownloaderCallback {
private LatLon firstTouchPointLatLon;
private LatLon secondTouchPointLatLon;
private boolean multiTouch;
+ private long multiTouchStartTime;
private long multiTouchEndTime;
private boolean wasZoomInMultiTouch;
@@ -326,6 +337,10 @@ public class OsmandMapTileView implements IMapDownloaderCallback {
return multiTouch;
}
+ public long getMultiTouchStartTime() {
+ return multiTouchStartTime;
+ }
+
public long getMultiTouchEndTime() {
return multiTouchEndTime;
}
@@ -592,13 +607,30 @@ public class OsmandMapTileView implements IMapDownloaderCallback {
}
private void fillCanvas(Canvas canvas, DrawSettings drawSettings) {
- if (drawSettings.isNightMode()) {
- canvas.drawARGB(255, 100, 100, 100);
- } else {
- canvas.drawARGB(255, 225, 225, 225);
+ Integer color = defaultColor;
+ if (color == null) {
+ color = updateDefaultColor(drawSettings.isNightMode());
}
+ canvas.drawColor(color);
}
+ public void resetDefaultColor() {
+ defaultColor = null;
+ }
+
+ private int updateDefaultColor(boolean nightMode) {
+ int color = MAP_DEFAULT_COLOR;
+ RenderingRulesStorage rrs = application.getRendererRegistry().getCurrentSelectedRenderer();
+ if (rrs != null) {
+ RenderingRuleSearchRequest req = new RenderingRuleSearchRequest(rrs);
+ req.setBooleanFilter(rrs.PROPS.R_NIGHT_MODE, nightMode);
+ if (req.searchRenderingAttribute(RenderingRuleStorageProperties.A_DEFAULT_COLOR)) {
+ color = req.getIntPropertyValue(req.ALL.R_ATTR_COLOR_VALUE);
+ defaultColor = color;
+ }
+ }
+ return color;
+ }
public boolean isMeasureFPS() {
return MEASURE_FPS;
@@ -631,6 +663,10 @@ public class OsmandMapTileView implements IMapDownloaderCallback {
}
}
+ if (activity instanceof MapActivity && !((MapActivity) activity).isActivityDestroyed() &&
+ ((MapActivity) activity).getSupportFragmentManager().findFragmentByTag(SecondSplashScreenFragment.TAG) != null) {
+ ((MapActivity) activity).dismissSecondSplashScreen();
+ }
for (int i = 0; i < layers.size(); i++) {
try {
OsmandMapLayer layer = layers.get(i);
@@ -1050,6 +1086,7 @@ public class OsmandMapTileView implements IMapDownloaderCallback {
secondTouchPointLatLon = currentViewport.getLatLonFromPixel(x2, y2);
multiTouch = true;
wasZoomInMultiTouch = false;
+ multiTouchStartTime = System.currentTimeMillis();
}
}
diff --git a/OsmAnd/src/net/osmand/plus/views/RulerControlLayer.java b/OsmAnd/src/net/osmand/plus/views/RulerControlLayer.java
index 9046a9184a..c6b35f9d2a 100644
--- a/OsmAnd/src/net/osmand/plus/views/RulerControlLayer.java
+++ b/OsmAnd/src/net/osmand/plus/views/RulerControlLayer.java
@@ -6,6 +6,7 @@ import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Paint.Style;
import android.graphics.Path;
+import android.graphics.PointF;
import android.graphics.Rect;
import android.os.Handler;
import android.os.Message;
@@ -28,330 +29,372 @@ import gnu.trove.list.array.TIntArrayList;
public class RulerControlLayer extends OsmandMapLayer {
- public static final long DELAY = 2000;
- private static final int TEXT_SIZE = 14;
+ private static final long DRAW_TIME = 2000;
+ private static final long DELAY_BEFORE_DRAW = 500;
+ private static final int TEXT_SIZE = 14;
- private final MapActivity mapActivity;
- private OsmandApplication app;
- private OsmandMapTileView view;
- private View rightWidgetsPanel;
+ private final MapActivity mapActivity;
+ private OsmandApplication app;
+ private OsmandMapTileView view;
+ private View rightWidgetsPanel;
- private TextSide textSide;
- private int maxRadiusInDp;
- private float maxRadius;
- private int radius;
- private double roundedDist;
- private boolean showTwoFingersDistance;
- private boolean showDistBetweenFingerAndLocation;
+ private TextSide textSide;
+ private int maxRadiusInDp;
+ private float maxRadius;
+ private int radius;
+ private double roundedDist;
+ private boolean showTwoFingersDistance;
+ private boolean showDistBetweenFingerAndLocation;
+ private boolean touchOutside;
+ private int acceptableTouchRadius;
- private QuadPoint cacheCenter;
- private int cacheIntZoom;
- private double cacheTileX;
- private double cacheTileY;
- private long cacheMultiTouchEndTime;
- private ArrayList cacheDistances;
- private Path distancePath;
- private TIntArrayList tx;
- private TIntArrayList ty;
- private LatLon singleTouchPointLatLon;
+ private QuadPoint cacheCenter;
+ private int cacheIntZoom;
+ private double cacheTileX;
+ private double cacheTileY;
+ private long cacheMultiTouchEndTime;
+ private ArrayList cacheDistances;
+ private Path distancePath;
+ private TIntArrayList tx;
+ private TIntArrayList ty;
+ private LatLon touchPointLatLon;
+ private PointF touchPoint;
+ private long touchStartTime;
+ private long touchEndTime;
+ private boolean touched;
+ private boolean wasZoom;
- private Bitmap centerIconDay;
- private Bitmap centerIconNight;
- private Paint bitmapPaint;
- private RenderingLineAttributes lineAttrs;
- private RenderingLineAttributes circleAttrs;
- private RenderingLineAttributes circleAttrsAlt;
+ private Bitmap centerIconDay;
+ private Bitmap centerIconNight;
+ private Paint bitmapPaint;
+ private RenderingLineAttributes lineAttrs;
+ private RenderingLineAttributes circleAttrs;
+ private RenderingLineAttributes circleAttrsAlt;
- private Handler handler;
+ private Handler handler;
- public RulerControlLayer(MapActivity mapActivity) {
- this.mapActivity = mapActivity;
- }
+ public RulerControlLayer(MapActivity mapActivity) {
+ this.mapActivity = mapActivity;
+ }
- public boolean isShowTwoFingersDistance() {
- return showTwoFingersDistance;
- }
+ public boolean isShowTwoFingersDistance() {
+ return showTwoFingersDistance;
+ }
- public boolean isShowDistBetweenFingerAndLocation() {
- return showDistBetweenFingerAndLocation;
- }
+ public boolean isShowDistBetweenFingerAndLocation() {
+ return showDistBetweenFingerAndLocation;
+ }
- public LatLon getSingleTouchPointLatLon() {
- return singleTouchPointLatLon;
- }
+ public LatLon getTouchPointLatLon() {
+ return touchPointLatLon;
+ }
- @Override
- public void initLayer(final OsmandMapTileView view) {
- app = mapActivity.getMyApplication();
- this.view = view;
- cacheDistances = new ArrayList<>();
- cacheCenter = new QuadPoint();
- maxRadiusInDp = mapActivity.getResources().getDimensionPixelSize(R.dimen.map_ruler_width);
- rightWidgetsPanel = mapActivity.findViewById(R.id.map_right_widgets_panel);
- distancePath = new Path();
- tx = new TIntArrayList();
- ty = new TIntArrayList();
+ @Override
+ public void initLayer(final OsmandMapTileView view) {
+ app = mapActivity.getMyApplication();
+ this.view = view;
+ cacheDistances = new ArrayList<>();
+ cacheCenter = new QuadPoint();
+ maxRadiusInDp = mapActivity.getResources().getDimensionPixelSize(R.dimen.map_ruler_width);
+ rightWidgetsPanel = mapActivity.findViewById(R.id.map_right_widgets_panel);
+ distancePath = new Path();
+ tx = new TIntArrayList();
+ ty = new TIntArrayList();
+ touchPoint = new PointF();
+ acceptableTouchRadius = mapActivity.getResources().getDimensionPixelSize(R.dimen.acceptable_touch_radius);
- centerIconDay = BitmapFactory.decodeResource(view.getResources(), R.drawable.map_ruler_center_day);
- centerIconNight = BitmapFactory.decodeResource(view.getResources(), R.drawable.map_ruler_center_night);
+ centerIconDay = BitmapFactory.decodeResource(view.getResources(), R.drawable.map_ruler_center_day);
+ centerIconNight = BitmapFactory.decodeResource(view.getResources(), R.drawable.map_ruler_center_night);
- bitmapPaint = new Paint();
- bitmapPaint.setAntiAlias(true);
- bitmapPaint.setDither(true);
- bitmapPaint.setFilterBitmap(true);
+ bitmapPaint = new Paint();
+ bitmapPaint.setAntiAlias(true);
+ bitmapPaint.setDither(true);
+ bitmapPaint.setFilterBitmap(true);
- lineAttrs = new RenderingLineAttributes("rulerLine");
+ lineAttrs = new RenderingLineAttributes("rulerLine");
- float textSize = TEXT_SIZE * mapActivity.getResources().getDisplayMetrics().density;
+ float textSize = TEXT_SIZE * mapActivity.getResources().getDisplayMetrics().density;
- circleAttrs = new RenderingLineAttributes("rulerCircle");
- circleAttrs.paint2.setTextSize(textSize);
- circleAttrs.paint3.setTextSize(textSize);
+ circleAttrs = new RenderingLineAttributes("rulerCircle");
+ circleAttrs.paint2.setTextSize(textSize);
+ circleAttrs.paint3.setTextSize(textSize);
- circleAttrsAlt = new RenderingLineAttributes("rulerCircleAlt");
- circleAttrsAlt.paint2.setTextSize(textSize);
- circleAttrsAlt.paint3.setTextSize(textSize);
+ circleAttrsAlt = new RenderingLineAttributes("rulerCircleAlt");
+ circleAttrsAlt.paint2.setTextSize(textSize);
+ circleAttrsAlt.paint3.setTextSize(textSize);
- handler = new Handler() {
- @Override
- public void handleMessage(Message msg) {
- view.refreshMap();
- }
- };
- }
+ handler = new Handler() {
+ @Override
+ public void handleMessage(Message msg) {
+ view.refreshMap();
+ }
+ };
+ }
- @Override
- public boolean isMapGestureAllowed(MapGestureType type) {
- if (rulerModeOn() && type == MapGestureType.TWO_POINTERS_ZOOM_OUT) {
- return false;
- } else {
- return true;
- }
- }
+ @Override
+ public boolean isMapGestureAllowed(MapGestureType type) {
+ if (rulerModeOn() && type == MapGestureType.TWO_POINTERS_ZOOM_OUT) {
+ return false;
+ } else {
+ return true;
+ }
+ }
- @Override
- public boolean onTouchEvent(MotionEvent event, RotatedTileBox tileBox) {
- if (event.getAction() == MotionEvent.ACTION_DOWN) {
- showDistBetweenFingerAndLocation = true;
- singleTouchPointLatLon = tileBox.getLatLonFromPixel(event.getX(), event.getY());
- } else if (event.getAction() == MotionEvent.ACTION_UP) {
- showDistBetweenFingerAndLocation = false;
- }
- return false;
- }
+ @Override
+ public boolean onTouchEvent(MotionEvent event, RotatedTileBox tileBox) {
+ if (rulerModeOn() && !showTwoFingersDistance) {
+ if (event.getAction() == MotionEvent.ACTION_DOWN) {
+ touched = true;
+ touchOutside = false;
+ touchPoint.set(event.getX(), event.getY());
+ touchPointLatLon = tileBox.getLatLonFromPixel(event.getX(), event.getY());
+ touchStartTime = System.currentTimeMillis();
+ wasZoom = false;
+ } else if (event.getAction() == MotionEvent.ACTION_MOVE && !touchOutside &&
+ !(touched && showDistBetweenFingerAndLocation)) {
+ double d = Math.sqrt(Math.pow(event.getX() - touchPoint.x, 2) + Math.pow(event.getY() - touchPoint.y, 2));
+ if (d > acceptableTouchRadius) {
+ touchOutside = true;
+ }
+ } else if (event.getAction() == MotionEvent.ACTION_UP) {
+ touched = false;
+ touchEndTime = System.currentTimeMillis();
+ refreshMapDelayed();
+ }
+ }
+ return false;
+ }
- @Override
- public void onDraw(Canvas canvas, RotatedTileBox tb, DrawSettings settings) {
- if (rulerModeOn()) {
- lineAttrs.updatePaints(view, settings, tb);
- circleAttrs.updatePaints(view, settings, tb);
- circleAttrs.paint2.setStyle(Style.FILL);
- circleAttrsAlt.updatePaints(view, settings, tb);
- circleAttrsAlt.paint2.setStyle(Style.FILL);
- final QuadPoint center = tb.getCenterPixelPoint();
- final RulerMode mode = app.getSettings().RULER_MODE.get();
+ @Override
+ public void onDraw(Canvas canvas, RotatedTileBox tb, DrawSettings settings) {
+ if (rulerModeOn()) {
+ lineAttrs.updatePaints(view, settings, tb);
+ circleAttrs.updatePaints(view, settings, tb);
+ circleAttrs.paint2.setStyle(Style.FILL);
+ circleAttrsAlt.updatePaints(view, settings, tb);
+ circleAttrsAlt.paint2.setStyle(Style.FILL);
+ final QuadPoint center = tb.getCenterPixelPoint();
+ final RulerMode mode = app.getSettings().RULER_MODE.get();
+ final long currentTime = System.currentTimeMillis();
- if (view.isMultiTouch()) {
- showDistBetweenFingerAndLocation = false;
- } else if (cacheMultiTouchEndTime != view.getMultiTouchEndTime()) {
- cacheMultiTouchEndTime = view.getMultiTouchEndTime();
- refreshMapDelayed();
- }
- showTwoFingersDistance = !view.isWasZoomInMultiTouch() && !tb.isZoomAnimated() &&
- (view.isMultiTouch() || System.currentTimeMillis() - cacheMultiTouchEndTime < DELAY);
+ if (cacheMultiTouchEndTime != view.getMultiTouchEndTime()) {
+ cacheMultiTouchEndTime = view.getMultiTouchEndTime();
+ refreshMapDelayed();
+ }
+ if (touched && view.isMultiTouch()) {
+ touched = false;
+ touchEndTime = currentTime;
+ }
+ if (tb.isZoomAnimated()) {
+ wasZoom = true;
+ }
- drawCenterIcon(canvas, tb, center, settings.isNightMode(), mode);
- Location currentLoc = app.getLocationProvider().getLastKnownLocation();
- if (showDistBetweenFingerAndLocation && currentLoc != null) {
- float x = tb.getPixXFromLonNoRot(singleTouchPointLatLon.getLongitude());
- float y = tb.getPixYFromLatNoRot(singleTouchPointLatLon.getLatitude());
- drawDistBetweenFingerAndLocation(canvas, tb, x, y, currentLoc, settings.isNightMode());
- } else if (showTwoFingersDistance) {
- LatLon firstTouchPoint = view.getFirstTouchPointLatLon();
- LatLon secondTouchPoint = view.getSecondTouchPointLatLon();
- float x1 = tb.getPixXFromLonNoRot(firstTouchPoint.getLongitude());
- float y1 = tb.getPixYFromLatNoRot(firstTouchPoint.getLatitude());
- float x2 = tb.getPixXFromLonNoRot(secondTouchPoint.getLongitude());
- float y2 = tb.getPixYFromLatNoRot(secondTouchPoint.getLatitude());
- drawFingerDistance(canvas, x1, y1, x2, y2, settings.isNightMode());
- }
- if (mode == RulerMode.FIRST || mode == RulerMode.SECOND) {
- updateData(tb, center);
- RenderingLineAttributes attrs;
- if (mode == RulerMode.FIRST) {
- attrs = circleAttrs;
- } else {
- attrs = circleAttrsAlt;
- }
- for (int i = 1; i <= cacheDistances.size(); i++) {
- drawCircle(canvas, tb, i, center, attrs);
- }
- }
- }
- }
+ showTwoFingersDistance = !tb.isZoomAnimated() &&
+ !view.isWasZoomInMultiTouch() &&
+ currentTime - view.getMultiTouchStartTime() > DELAY_BEFORE_DRAW &&
+ (view.isMultiTouch() || currentTime - cacheMultiTouchEndTime < DRAW_TIME);
- private boolean rulerModeOn() {
- return mapActivity.getMapLayers().getMapWidgetRegistry().isVisible("ruler") &&
- rightWidgetsPanel.getVisibility() == View.VISIBLE;
- }
+ showDistBetweenFingerAndLocation = !wasZoom &&
+ !showTwoFingersDistance &&
+ !view.isMultiTouch() &&
+ !touchOutside &&
+ touchStartTime - view.getMultiTouchStartTime() > DELAY_BEFORE_DRAW &&
+ currentTime - touchStartTime > DELAY_BEFORE_DRAW &&
+ (touched || currentTime - touchEndTime < DRAW_TIME);
- public void refreshMapDelayed() {
- handler.sendEmptyMessageDelayed(0, DELAY + 50);
- }
+ drawCenterIcon(canvas, tb, center, settings.isNightMode(), mode);
+ Location currentLoc = app.getLocationProvider().getLastKnownLocation();
+ if (showDistBetweenFingerAndLocation && currentLoc != null) {
+ float x = tb.getPixXFromLonNoRot(touchPointLatLon.getLongitude());
+ float y = tb.getPixYFromLatNoRot(touchPointLatLon.getLatitude());
+ drawDistBetweenFingerAndLocation(canvas, tb, x, y, currentLoc, settings.isNightMode());
+ } else if (showTwoFingersDistance) {
+ LatLon firstTouchPoint = view.getFirstTouchPointLatLon();
+ LatLon secondTouchPoint = view.getSecondTouchPointLatLon();
+ float x1 = tb.getPixXFromLonNoRot(firstTouchPoint.getLongitude());
+ float y1 = tb.getPixYFromLatNoRot(firstTouchPoint.getLatitude());
+ float x2 = tb.getPixXFromLonNoRot(secondTouchPoint.getLongitude());
+ float y2 = tb.getPixYFromLatNoRot(secondTouchPoint.getLatitude());
+ drawTwoFingersDistance(canvas, x1, y1, x2, y2, settings.isNightMode());
+ }
+ if (mode == RulerMode.FIRST || mode == RulerMode.SECOND) {
+ updateData(tb, center);
+ RenderingLineAttributes attrs;
+ if (mode == RulerMode.FIRST) {
+ attrs = circleAttrs;
+ } else {
+ attrs = circleAttrsAlt;
+ }
+ for (int i = 1; i <= cacheDistances.size(); i++) {
+ drawCircle(canvas, tb, i, center, attrs);
+ }
+ }
+ }
+ }
- private void drawFingerDistance(Canvas canvas, float x1, float y1, float x2, float y2, boolean nightMode) {
- canvas.drawLine(x1, y1, x2, y2, lineAttrs.paint);
- drawFingerTouchIcon(canvas, x1, y1, nightMode);
- drawFingerTouchIcon(canvas, x2, y2, nightMode);
- }
+ private boolean rulerModeOn() {
+ return mapActivity.getMapLayers().getMapWidgetRegistry().isVisible("ruler") &&
+ rightWidgetsPanel.getVisibility() == View.VISIBLE;
+ }
- private void drawFingerTouchIcon(Canvas canvas, float x, float y, boolean nightMode) {
- if (nightMode) {
- canvas.drawBitmap(centerIconNight, x - centerIconNight.getWidth() / 2,
- y - centerIconNight.getHeight() / 2, bitmapPaint);
- } else {
- canvas.drawBitmap(centerIconDay, x - centerIconDay.getWidth() / 2,
- y - centerIconDay.getHeight() / 2, bitmapPaint);
- }
- }
+ private void refreshMapDelayed() {
+ handler.sendEmptyMessageDelayed(0, DRAW_TIME + 50);
+ }
- private void drawCenterIcon(Canvas canvas, RotatedTileBox tb, QuadPoint center, boolean nightMode,
- RulerMode mode) {
- canvas.rotate(-tb.getRotate(), center.x, center.y);
- if (nightMode || mode == RulerMode.SECOND) {
- canvas.drawBitmap(centerIconNight, center.x - centerIconNight.getWidth() / 2,
- center.y - centerIconNight.getHeight() / 2, bitmapPaint);
- } else {
- canvas.drawBitmap(centerIconDay, center.x - centerIconDay.getWidth() / 2,
- center.y - centerIconDay.getHeight() / 2, bitmapPaint);
- }
- canvas.rotate(tb.getRotate(), center.x, center.y);
- }
+ private void drawTwoFingersDistance(Canvas canvas, float x1, float y1, float x2, float y2, boolean nightMode) {
+ canvas.drawLine(x1, y1, x2, y2, lineAttrs.paint);
+ drawFingerTouchIcon(canvas, x1, y1, nightMode);
+ drawFingerTouchIcon(canvas, x2, y2, nightMode);
+ }
- private void drawDistBetweenFingerAndLocation(Canvas canvas, RotatedTileBox tb, float x, float y,
- Location currentLoc, boolean nightMode) {
- int currX = tb.getPixXFromLonNoRot(currentLoc.getLongitude());
- int currY = tb.getPixYFromLatNoRot(currentLoc.getLatitude());
- distancePath.reset();
- tx.clear();
- ty.clear();
+ private void drawFingerTouchIcon(Canvas canvas, float x, float y, boolean nightMode) {
+ if (nightMode) {
+ canvas.drawBitmap(centerIconNight, x - centerIconNight.getWidth() / 2,
+ y - centerIconNight.getHeight() / 2, bitmapPaint);
+ } else {
+ canvas.drawBitmap(centerIconDay, x - centerIconDay.getWidth() / 2,
+ y - centerIconDay.getHeight() / 2, bitmapPaint);
+ }
+ }
- tx.add(currX);
- ty.add(currY);
- tx.add((int) x);
- ty.add((int) y);
+ private void drawCenterIcon(Canvas canvas, RotatedTileBox tb, QuadPoint center, boolean nightMode,
+ RulerMode mode) {
+ canvas.rotate(-tb.getRotate(), center.x, center.y);
+ if (nightMode || mode == RulerMode.SECOND) {
+ canvas.drawBitmap(centerIconNight, center.x - centerIconNight.getWidth() / 2,
+ center.y - centerIconNight.getHeight() / 2, bitmapPaint);
+ } else {
+ canvas.drawBitmap(centerIconDay, center.x - centerIconDay.getWidth() / 2,
+ center.y - centerIconDay.getHeight() / 2, bitmapPaint);
+ }
+ canvas.rotate(tb.getRotate(), center.x, center.y);
+ }
- calculatePath(tb, tx, ty, distancePath);
- canvas.drawPath(distancePath, lineAttrs.paint);
- drawFingerTouchIcon(canvas, x, y, nightMode);
- }
+ private void drawDistBetweenFingerAndLocation(Canvas canvas, RotatedTileBox tb, float x, float y,
+ Location currentLoc, boolean nightMode) {
+ int currX = tb.getPixXFromLonNoRot(currentLoc.getLongitude());
+ int currY = tb.getPixYFromLatNoRot(currentLoc.getLatitude());
+ distancePath.reset();
+ tx.clear();
+ ty.clear();
- private void updateData(RotatedTileBox tb, QuadPoint center) {
- if (tb.getPixHeight() > 0 && tb.getPixWidth() > 0 && maxRadiusInDp > 0) {
- if (cacheCenter.y != center.y || cacheCenter.x != center.x) {
- cacheCenter = center;
- updateCenter(tb, center);
- }
+ tx.add(currX);
+ ty.add(currY);
+ tx.add((int) x);
+ ty.add((int) y);
- boolean move = tb.getZoom() != cacheIntZoom || Math.abs(tb.getCenterTileX() - cacheTileX) > 1 ||
- Math.abs(tb.getCenterTileY() - cacheTileY) > 1;
+ calculatePath(tb, tx, ty, distancePath);
+ canvas.drawPath(distancePath, lineAttrs.paint);
+// canvas.drawLine(currX, currY, x, y, lineAttrs.paint);
+ drawFingerTouchIcon(canvas, x, y, nightMode);
+ }
- if (!tb.isZoomAnimated() && move) {
- cacheIntZoom = tb.getZoom();
- cacheTileX = tb.getCenterTileX();
- cacheTileY = tb.getCenterTileY();
- cacheDistances.clear();
- updateDistance(tb);
- }
- }
- }
+ private void updateData(RotatedTileBox tb, QuadPoint center) {
+ if (tb.getPixHeight() > 0 && tb.getPixWidth() > 0 && maxRadiusInDp > 0) {
+ if (cacheCenter.y != center.y || cacheCenter.x != center.x) {
+ cacheCenter = center;
+ updateCenter(tb, center);
+ }
- private void updateCenter(RotatedTileBox tb, QuadPoint center) {
- float topDist = center.y;
- float bottomDist = tb.getPixHeight() - center.y;
- float leftDist = center.x;
- float rightDist = tb.getPixWidth() - center.x;
- float maxVertical = topDist >= bottomDist ? topDist : bottomDist;
- float maxHorizontal = rightDist >= leftDist ? rightDist : leftDist;
+ boolean move = tb.getZoom() != cacheIntZoom || Math.abs(tb.getCenterTileX() - cacheTileX) > 1 ||
+ Math.abs(tb.getCenterTileY() - cacheTileY) > 1;
- if (maxVertical >= maxHorizontal) {
- maxRadius = maxVertical;
- textSide = TextSide.VERTICAL;
- } else {
- maxRadius = maxHorizontal;
- textSide = TextSide.HORIZONTAL;
- }
- if (radius != 0) {
- updateText();
- }
- }
+ if (!tb.isZoomAnimated() && move) {
+ cacheIntZoom = tb.getZoom();
+ cacheTileX = tb.getCenterTileX();
+ cacheTileY = tb.getCenterTileY();
+ cacheDistances.clear();
+ updateDistance(tb);
+ }
+ }
+ }
- private void updateDistance(RotatedTileBox tb) {
- final double dist = tb.getDistance(0, tb.getPixHeight() / 2, tb.getPixWidth(), tb.getPixHeight() / 2);
- double pixDensity = tb.getPixWidth() / dist;
- roundedDist = OsmAndFormatter.calculateRoundedDist(maxRadiusInDp / pixDensity, app);
- radius = (int) (pixDensity * roundedDist);
- updateText();
- }
+ private void updateCenter(RotatedTileBox tb, QuadPoint center) {
+ float topDist = center.y;
+ float bottomDist = tb.getPixHeight() - center.y;
+ float leftDist = center.x;
+ float rightDist = tb.getPixWidth() - center.x;
+ float maxVertical = topDist >= bottomDist ? topDist : bottomDist;
+ float maxHorizontal = rightDist >= leftDist ? rightDist : leftDist;
- private void updateText() {
- double maxCircleRadius = maxRadius;
- int i = 1;
- while ((maxCircleRadius -= radius) > 0) {
- cacheDistances.add(OsmAndFormatter
- .getFormattedDistance((float) roundedDist * i++, app, false).replaceAll(" ", ""));
- }
- }
+ if (maxVertical >= maxHorizontal) {
+ maxRadius = maxVertical;
+ textSide = TextSide.VERTICAL;
+ } else {
+ maxRadius = maxHorizontal;
+ textSide = TextSide.HORIZONTAL;
+ }
+ if (radius != 0) {
+ updateText();
+ }
+ }
- private void drawCircle(Canvas canvas, RotatedTileBox tb, int circleNumber, QuadPoint center,
- RenderingLineAttributes attrs) {
- if (!tb.isZoomAnimated()) {
- Rect bounds = new Rect();
- String text = cacheDistances.get(circleNumber - 1);
- attrs.paint2.getTextBounds(text, 0, text.length(), bounds);
+ private void updateDistance(RotatedTileBox tb) {
+ final double dist = tb.getDistance(0, tb.getPixHeight() / 2, tb.getPixWidth(), tb.getPixHeight() / 2);
+ double pixDensity = tb.getPixWidth() / dist;
+ roundedDist = OsmAndFormatter.calculateRoundedDist(maxRadiusInDp / pixDensity, app);
+ radius = (int) (pixDensity * roundedDist);
+ updateText();
+ }
- // coords of left or top text
- float x1 = 0;
- float y1 = 0;
- // coords of right or bottom text
- float x2 = 0;
- float y2 = 0;
+ private void updateText() {
+ double maxCircleRadius = maxRadius;
+ int i = 1;
+ while ((maxCircleRadius -= radius) > 0) {
+ cacheDistances.add(OsmAndFormatter
+ .getFormattedDistance((float) roundedDist * i++, app, false).replaceAll(" ", ""));
+ }
+ }
- if (textSide == TextSide.VERTICAL) {
- x1 = center.x - bounds.width() / 2;
- y1 = center.y - radius * circleNumber + bounds.height() / 2;
- x2 = center.x - bounds.width() / 2;
- y2 = center.y + radius * circleNumber + bounds.height() / 2;
- } else if (textSide == TextSide.HORIZONTAL) {
- x1 = center.x - radius * circleNumber - bounds.width() / 2;
- y1 = center.y + bounds.height() / 2;
- x2 = center.x + radius * circleNumber - bounds.width() / 2;
- y2 = center.y + bounds.height() / 2;
- }
+ private void drawCircle(Canvas canvas, RotatedTileBox tb, int circleNumber, QuadPoint center,
+ RenderingLineAttributes attrs) {
+ if (!tb.isZoomAnimated()) {
+ Rect bounds = new Rect();
+ String text = cacheDistances.get(circleNumber - 1);
+ attrs.paint2.getTextBounds(text, 0, text.length(), bounds);
- canvas.rotate(-tb.getRotate(), center.x, center.y);
- canvas.drawCircle(center.x, center.y, radius * circleNumber, attrs.shadowPaint);
- canvas.drawCircle(center.x, center.y, radius * circleNumber, attrs.paint);
- canvas.drawText(text, x1, y1, attrs.paint3);
- canvas.drawText(text, x1, y1, attrs.paint2);
- canvas.drawText(text, x2, y2, attrs.paint3);
- canvas.drawText(text, x2, y2, attrs.paint2);
- canvas.rotate(tb.getRotate(), center.x, center.y);
- }
- }
+ // coords of left or top text
+ float x1 = 0;
+ float y1 = 0;
+ // coords of right or bottom text
+ float x2 = 0;
+ float y2 = 0;
- private enum TextSide {
- VERTICAL,
- HORIZONTAL
- }
+ if (textSide == TextSide.VERTICAL) {
+ x1 = center.x - bounds.width() / 2;
+ y1 = center.y - radius * circleNumber + bounds.height() / 2;
+ x2 = center.x - bounds.width() / 2;
+ y2 = center.y + radius * circleNumber + bounds.height() / 2;
+ } else if (textSide == TextSide.HORIZONTAL) {
+ x1 = center.x - radius * circleNumber - bounds.width() / 2;
+ y1 = center.y + bounds.height() / 2;
+ x2 = center.x + radius * circleNumber - bounds.width() / 2;
+ y2 = center.y + bounds.height() / 2;
+ }
- @Override
- public void destroyLayer() {
+ canvas.rotate(-tb.getRotate(), center.x, center.y);
+ canvas.drawCircle(center.x, center.y, radius * circleNumber, attrs.shadowPaint);
+ canvas.drawCircle(center.x, center.y, radius * circleNumber, attrs.paint);
+ canvas.drawText(text, x1, y1, attrs.paint3);
+ canvas.drawText(text, x1, y1, attrs.paint2);
+ canvas.drawText(text, x2, y2, attrs.paint3);
+ canvas.drawText(text, x2, y2, attrs.paint2);
+ canvas.rotate(tb.getRotate(), center.x, center.y);
+ }
+ }
- }
+ private enum TextSide {
+ VERTICAL,
+ HORIZONTAL
+ }
- @Override
- public boolean drawInScreenPixels() {
- return false;
- }
+ @Override
+ public void destroyLayer() {
+
+ }
+
+ @Override
+ public boolean drawInScreenPixels() {
+ return false;
+ }
}
diff --git a/OsmAnd/src/net/osmand/plus/views/mapwidgets/MapInfoWidgetsFactory.java b/OsmAnd/src/net/osmand/plus/views/mapwidgets/MapInfoWidgetsFactory.java
index ce6bfd1a21..7304f7f524 100644
--- a/OsmAnd/src/net/osmand/plus/views/mapwidgets/MapInfoWidgetsFactory.java
+++ b/OsmAnd/src/net/osmand/plus/views/mapwidgets/MapInfoWidgetsFactory.java
@@ -127,8 +127,8 @@ public class MapInfoWidgetsFactory {
Location currentLoc = map.getMyApplication().getLocationProvider().getLastKnownLocation();
if (rulerLayer.isShowDistBetweenFingerAndLocation() && currentLoc != null) {
- if (!cacheSingleTouchPoint.equals(rulerLayer.getSingleTouchPointLatLon())) {
- cacheSingleTouchPoint = rulerLayer.getSingleTouchPointLatLon();
+ if (!cacheSingleTouchPoint.equals(rulerLayer.getTouchPointLatLon())) {
+ cacheSingleTouchPoint = rulerLayer.getTouchPointLatLon();
setDistanceText(cacheSingleTouchPoint.getLatitude(), cacheSingleTouchPoint.getLongitude(),
currentLoc.getLatitude(), currentLoc.getLongitude());
fingerAndLocDistWasShown = true;