From 895b61a34b4c3b621ffa16569338f5760f47edce Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Mon, 16 Feb 2015 09:42:49 +0100 Subject: [PATCH 1/2] Fix issues --- .../src/net/osmand/map/OsmandRegions.java | 3 +++ .../src/net/osmand/osm/edit/EntityParser.java | 3 --- .../net/osmand/plus/render/MapVectorLayer.java | 16 ++++++++-------- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/OsmAnd-java/src/net/osmand/map/OsmandRegions.java b/OsmAnd-java/src/net/osmand/map/OsmandRegions.java index 6c0c9cc394..f356859b50 100644 --- a/OsmAnd-java/src/net/osmand/map/OsmandRegions.java +++ b/OsmAnd-java/src/net/osmand/map/OsmandRegions.java @@ -309,6 +309,9 @@ public class OsmandRegions { String prefix = getPrefix(o).toLowerCase(); String locPrefix = downloadNamesToLocaleNames.get(prefix); String locName = downloadNamesToLocaleNames.get(downloadName); + if(locPrefix == null || locName == null) { + throw new IllegalStateException("There is no prefix registered for " + downloadName + " (" + prefix + ") "); + } downloadNamesToLocaleNames.put(downloadName, locPrefix + " " + locName); String index = downloadNamesToLowercaseIndex.get(downloadName); downloadNamesToLowercaseIndex.put(downloadName, index + " " + prefix + " " + locPrefix.toLowerCase()); diff --git a/OsmAnd-java/src/net/osmand/osm/edit/EntityParser.java b/OsmAnd-java/src/net/osmand/osm/edit/EntityParser.java index 411c0ff204..6c316f96df 100644 --- a/OsmAnd-java/src/net/osmand/osm/edit/EntityParser.java +++ b/OsmAnd-java/src/net/osmand/osm/edit/EntityParser.java @@ -19,9 +19,6 @@ import net.osmand.util.Algorithms; public class EntityParser { public static void parseMapObject(MapObject mo, Entity e) { - parseMapObject(mo, e, e.getId()); - } - public static void parseMapObject(MapObject mo, Entity e, long lid) { mo.setId(e.getId()); if(mo instanceof Amenity) { mo.setId((e.getId() << 1) + ((e instanceof Node) ? 0 : 1)); diff --git a/OsmAnd/src/net/osmand/plus/render/MapVectorLayer.java b/OsmAnd/src/net/osmand/plus/render/MapVectorLayer.java index 822c331239..de8e16b90f 100644 --- a/OsmAnd/src/net/osmand/plus/render/MapVectorLayer.java +++ b/OsmAnd/src/net/osmand/plus/render/MapVectorLayer.java @@ -106,10 +106,10 @@ public class MapVectorLayer extends BaseMapLayer { cachedUnderlay = st.MAP_UNDERLAY.get(); ITileSource tileSource = st.getTileSourceByName(cachedUnderlay, false); if (tileSource != null) { - // TileSourceProxyProvider prov = new TileSourceProxyProvider(view.getApplication(), tileSource); - // mapRenderer.setMapLayerProvider(-1, prov.instantiateProxy(true)); - // prov.swigReleaseOwnership(); - mapRenderer.setMapLayerProvider(-1, net.osmand.core.jni.OnlineTileSources.getBuiltIn().createProviderFor("Mapnik (OsmAnd)")); + TileSourceProxyProvider prov = new TileSourceProxyProvider(view.getApplication(), tileSource); + mapRenderer.setMapLayerProvider(-1, prov.instantiateProxy(true)); + prov.swigReleaseOwnership(); +// mapRenderer.setMapLayerProvider(-1, net.osmand.core.jni.OnlineTileSources.getBuiltIn().createProviderFor("Mapnik (OsmAnd)")); } else { mapRenderer.resetMapLayerProvider(-1); } @@ -124,10 +124,10 @@ public class MapVectorLayer extends BaseMapLayer { cachedOverlay = st.MAP_OVERLAY.get(); ITileSource tileSource = st.getTileSourceByName(cachedOverlay, false); if (tileSource != null) { - //TileSourceProxyProvider prov = new TileSourceProxyProvider(view.getApplication(), tileSource); - //mapRenderer.setMapLayerProvider(1, prov.instantiateProxy(true)); - //prov.swigReleaseOwnership(); - mapRenderer.setMapLayerProvider(1, net.osmand.core.jni.OnlineTileSources.getBuiltIn().createProviderFor("Mapnik (OsmAnd)")); + TileSourceProxyProvider prov = new TileSourceProxyProvider(view.getApplication(), tileSource); + mapRenderer.setMapLayerProvider(1, prov.instantiateProxy(true)); + prov.swigReleaseOwnership(); +// mapRenderer.setMapLayerProvider(1, net.osmand.core.jni.OnlineTileSources.getBuiltIn().createProviderFor("Mapnik (OsmAnd)")); } else { mapRenderer.resetMapLayerProvider(1); } From 8ab5081ce0ad1fea923bf8c4901abd6e94ec70fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20=C3=9Ar?= Date: Sun, 15 Feb 2015 22:20:18 +0100 Subject: [PATCH 2/2] Translated using Weblate (Hungarian) Currently translated at 99.8% (1630 of 1632 strings) --- OsmAnd/res/values-hu/strings.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/OsmAnd/res/values-hu/strings.xml b/OsmAnd/res/values-hu/strings.xml index 685446fc4b..0d08053f9d 100644 --- a/OsmAnd/res/values-hu/strings.xml +++ b/OsmAnd/res/values-hu/strings.xml @@ -1848,4 +1848,6 @@ Hajózási térképek A sítérképek megjelenítése érdekében a speciális kapcsolat nélküli térkép letöltése szükséges A hajózási térképek megjelenítése érdekében a speciális kapcsolat nélküli térkép letöltése szükséges + Eszköz memóriája + "Szabad %1$s "