diff --git a/OsmAnd-java/src/net/osmand/binary/BinaryInspector.java b/OsmAnd-java/src/net/osmand/binary/BinaryInspector.java index c7af5f2624..e8f437df18 100644 --- a/OsmAnd-java/src/net/osmand/binary/BinaryInspector.java +++ b/OsmAnd-java/src/net/osmand/binary/BinaryInspector.java @@ -61,13 +61,13 @@ public class BinaryInspector { if(args.length == 1 && "test".equals(args[0])) { in.inspector(new String[]{ //"-vpoi", - "-vmap", "-vmapobjects", +// "-vmap", "-vmapobjects", // "-vrouting", // "-vaddress", "-vcities", "-vstreets", "-vstreetgroups","-vbuildings", //"-zoom=16", //"-bbox=4,55,7,50", - "/home/victor/projects/osmand/osm-gen/Map.obf" -// "/home/victor/projects/osmand/osm-gen/Netherlands_europe.obf" +// "/home/victor/projects/osmand/osm-gen/Map.obf" + "/home/victor/projects/osmand/osm-gen/Ukraine_europe.obf" // "/home/victor/projects/osmand/osm-gen/World_basemap_2_b.obf___" // "/home/victor/projects/osmand/osm-gen/World_basemap_2.obf__" }); diff --git a/OsmAnd-java/src/net/osmand/render/RenderingRule.java b/OsmAnd-java/src/net/osmand/render/RenderingRule.java index f51c7e3759..74657b6f93 100644 --- a/OsmAnd-java/src/net/osmand/render/RenderingRule.java +++ b/OsmAnd-java/src/net/osmand/render/RenderingRule.java @@ -14,6 +14,7 @@ public class RenderingRule { private RenderingRuleProperty[] properties; private int[] intProperties; + private RenderingRule[] attributesRef; private float[] floatProperties; private List ifElseChildren; private List ifChildren; @@ -41,6 +42,7 @@ public class RenderingRule { ArrayList props = new ArrayList(attributes.size()); intProperties = new int[attributes.size()]; floatProperties = null; + attributesRef = null; int i = 0; Iterator> it = attributes.entrySet().iterator(); while (it.hasNext()) { @@ -48,18 +50,23 @@ public class RenderingRule { RenderingRuleProperty property = storage.PROPS.get(e.getKey()); if (property != null) { props.add(property); - - if (property.isString()) { - intProperties[i] = storage.getDictionaryValue(e.getValue()); + String vl = e.getValue(); + if(vl.startsWith("$")){ + if (attributesRef == null) { + attributesRef = new RenderingRule[attributes.size()]; + } + attributesRef[i] = storage.getRenderingAttributeRule(vl.substring(1)); + } else if (property.isString()) { + intProperties[i] = storage.getDictionaryValue(vl); } else if (property.isFloat()) { if (floatProperties == null) { // lazy creates floatProperties = new float[attributes.size()]; } - floatProperties[i] = property.parseFloatValue(e.getValue()); - intProperties[i] = property.parseIntValue(e.getValue()); + floatProperties[i] = property.parseFloatValue(vl); + intProperties[i] = property.parseIntValue(vl); } else { - intProperties[i] = property.parseIntValue(e.getValue()); + intProperties[i] = property.parseIntValue(vl); } i++; } @@ -114,6 +121,13 @@ public class RenderingRule { return intProperties[ind]; } + protected RenderingRule getAttrProp(int ind) { + if(attributesRef == null) { + return null; + } + return attributesRef[ind]; + } + protected float getFloatProp(int ind){ return floatProperties[ind]; } diff --git a/OsmAnd-java/src/net/osmand/render/RenderingRuleSearchRequest.java b/OsmAnd-java/src/net/osmand/render/RenderingRuleSearchRequest.java index 0f94db895f..56d04b461a 100644 --- a/OsmAnd-java/src/net/osmand/render/RenderingRuleSearchRequest.java +++ b/OsmAnd-java/src/net/osmand/render/RenderingRuleSearchRequest.java @@ -157,7 +157,7 @@ public class RenderingRuleSearchRequest { if(!input) { return false; } - if (!loadOutput) { + if (!loadOutput && !rule.isGroup()) { return true; } // accept it @@ -171,7 +171,8 @@ public class RenderingRuleSearchRequest { break; } } - if (match || !rule.isGroup()) { + boolean fit = (match || !rule.isGroup()); + if (fit && loadOutput) { if (rule.isGroup()) { loadOutputProperties(rule, false); } @@ -179,9 +180,8 @@ public class RenderingRuleSearchRequest { for (RenderingRule rr : rule.getIfChildren()) { visitRule(rr, loadOutput); } - return true; } - return false; + return fit; } @@ -191,7 +191,16 @@ public class RenderingRuleSearchRequest { RenderingRuleProperty rp = properties[i]; if (rp.isOutputProperty()) { if (!isSpecified(rp) || override) { - if (rp.isFloat()) { + RenderingRule rr = rule.getAttrProp(i); + if(rr != null) { + visitRule(rr, true); + if(isSpecified(storage.PROPS.R_ATTR_COLOR_VALUE)){ + values[rp.getId()] = getIntPropertyValue(storage.PROPS.R_ATTR_COLOR_VALUE); + } else if(isSpecified(storage.PROPS.R_ATTR_INT_VALUE)){ + values[rp.getId()] = getIntPropertyValue(storage.PROPS.R_ATTR_INT_VALUE); + fvalues[rp.getId()] = getFloatPropertyValue(storage.PROPS.R_ATTR_INT_VALUE); + } + } else if (rp.isFloat()) { fvalues[rp.getId()] = rule.getFloatProp(i); values[rp.getId()] = rule.getIntProp(i); } else { diff --git a/OsmAnd-java/src/net/osmand/render/RenderingRulesStorage.java b/OsmAnd-java/src/net/osmand/render/RenderingRulesStorage.java index 0625a5124b..9cb0422760 100644 --- a/OsmAnd-java/src/net/osmand/render/RenderingRulesStorage.java +++ b/OsmAnd-java/src/net/osmand/render/RenderingRulesStorage.java @@ -48,7 +48,7 @@ public class RenderingRulesStorage { public TIntObjectHashMap[] tagValueGlobalRules = new TIntObjectHashMap[LENGTH_RULES]; protected Map renderingAttributes = new LinkedHashMap(); - protected Map renderingConstants= new LinkedHashMap(); + protected Map renderingConstants = new LinkedHashMap(); private String renderingName; private String internalRenderingName; @@ -335,10 +335,13 @@ public class RenderingRulesStorage { String vl = parser.getAttributeValue(i); if (vl != null && vl.startsWith("$")) { String cv = vl.substring(1); - if (!renderingConstants.containsKey(cv)) { - throw new IllegalStateException("Rendering constant '" + cv + "' was not specified."); + if (!renderingConstants.containsKey(cv) && + !renderingAttributes.containsKey(cv)) { + throw new IllegalStateException("Rendering constant or attribute '" + cv + "' was not specified."); + } + if(renderingConstants.containsKey(cv)){ + vl = renderingConstants.get(cv); } - vl = renderingConstants.get(cv); } m.put(name, vl); } @@ -470,7 +473,7 @@ public class RenderingRulesStorage { }; storage.parseRulesFromXmlInputStream(is, resolver); - printAllRules(storage); +// printAllRules(storage); testSearch(storage); } @@ -479,22 +482,22 @@ public class RenderingRulesStorage { // int count = 100000; // for (int i = 0; i < count; i++) { RenderingRuleSearchRequest searchRequest = new RenderingRuleSearchRequest(storage); - searchRequest.setStringFilter(storage.PROPS.R_TAG, "natural"); - searchRequest.setStringFilter(storage.PROPS.R_VALUE, "tree"); - searchRequest.setStringFilter(storage.PROPS.R_ADDITIONAL, "leaf_type=broadleaved"); + searchRequest.setStringFilter(storage.PROPS.R_TAG, "highway"); + searchRequest.setStringFilter(storage.PROPS.R_VALUE, "primary"); +// searchRequest.setStringFilter(storage.PROPS.R_ADDITIONAL, "leaf_type=broadleaved"); // searchRequest.setIntFilter(storage.PROPS.R_LAYER, 1); - searchRequest.setIntFilter(storage.PROPS.R_MINZOOM, 18); - searchRequest.setIntFilter(storage.PROPS.R_MAXZOOM, 18); - // searchRequest.setBooleanFilter(storage.PROPS.R_NIGHT_MODE, true); - // searchRequest.setBooleanFilter(storage.PROPS.get("hmRendered"), true); - for (RenderingRuleProperty customProp : storage.PROPS.getCustomRules()) { - if (customProp.isBoolean()) { - searchRequest.setBooleanFilter(customProp, false); - } else { - searchRequest.setStringFilter(customProp, ""); - } - } - boolean res = searchRequest.search(POINT_RULES); + searchRequest.setIntFilter(storage.PROPS.R_MINZOOM, 9); + searchRequest.setIntFilter(storage.PROPS.R_MAXZOOM, 9); +// searchRequest.setBooleanFilter(storage.PROPS.R_NIGHT_MODE, true); +// for (RenderingRuleProperty customProp : storage.PROPS.getCustomRules()) { +// if (customProp.isBoolean()) { +// searchRequest.setBooleanFilter(customProp, false); +// } else { +// searchRequest.setStringFilter(customProp, ""); +// } +// } + searchRequest.setBooleanFilter(storage.PROPS.get("noPolygons"), true); + boolean res = searchRequest.search(LINE_RULES); System.out.println("Result " + res); printResult(searchRequest, System.out); // } diff --git a/OsmAnd-java/src/net/osmand/router/GeneralRouter.java b/OsmAnd-java/src/net/osmand/router/GeneralRouter.java index 6f5cc4ce94..f54dba0f3c 100644 --- a/OsmAnd-java/src/net/osmand/router/GeneralRouter.java +++ b/OsmAnd-java/src/net/osmand/router/GeneralRouter.java @@ -1,5 +1,7 @@ package net.osmand.router; +import gnu.trove.set.hash.TLongHashSet; + import java.io.PrintStream; import java.util.ArrayList; import java.util.BitSet; @@ -50,6 +52,8 @@ public class GeneralRouter implements VehicleRouter { // speed in m/s private float maxDefaultSpeed = 10; + private TLongHashSet impassableRoads; + public enum RouteDataObjectAttribute { ROAD_SPEED("speed"), @@ -180,9 +184,19 @@ public class GeneralRouter implements VehicleRouter { @Override public boolean acceptLine(RouteDataObject way) { int res = getObjContext(RouteDataObjectAttribute.ACCESS).evaluateInt(way, 0); + if(impassableRoads != null && impassableRoads.contains(way.id)) { + return false; + } return res >= 0; } + public long[] getImpassableRoadIds() { + if(impassableRoads == null) { + return new long[0]; + } + return impassableRoads.toArray(); + } + private int registerTagValueAttribute(String tag, String value) { String key = tag +"$"+value; if(universalRules.containsKey(key)) { @@ -317,23 +331,23 @@ public class GeneralRouter implements VehicleRouter { } @Override public double calculateTurnTime(RouteSegment segment, int segmentEnd, RouteSegment prev, int prevSegmentEnd) { - int[] pt = prev.getRoad().getPointTypes(prevSegmentEnd); - if(pt != null) { - RouteRegion reg = prev.getRoad().region; - for (int i = 0; i < pt.length; i++) { - RouteTypeRule r = reg.quickGetEncodingRule(pt[i]); - if ("highway".equals(r.getTag()) && "traffic_signals".equals(r.getValue())) { - // traffic signals don't add turn info -// return 0; - } - } - } - float ts = getPenaltyTransition(segment.getRoad()); float prevTs = getPenaltyTransition(prev.getRoad()); if(prevTs != ts) { if(ts > prevTs) return (ts - prevTs); } +// int[] pt = prev.getRoad().getPointTypes(prevSegmentEnd); +// if(pt != null) { +// RouteRegion reg = prev.getRoad().region; +// for (int i = 0; i < pt.length; i++) { +// RouteTypeRule r = reg.quickGetEncodingRule(pt[i]); +// if ("highway".equals(r.getTag()) && "traffic_signals".equals(r.getValue())) { +// // traffic signals don't add turn info +// return 0; +// } +// } +// } + if(segment.getRoad().roundabout() && !prev.getRoad().roundabout()) { double rt = getRoundaboutTurn(); @@ -860,5 +874,14 @@ public class GeneralRouter implements VehicleRouter { } } + + public void addImpassableRoads(TLongHashSet impassableRoads) { + if (impassableRoads != null && !impassableRoads.isEmpty()) { + if (this.impassableRoads == null) { + this.impassableRoads = new TLongHashSet(); + } + this.impassableRoads.addAll(impassableRoads); + } + } } diff --git a/OsmAnd-java/src/net/osmand/router/RoutingConfiguration.java b/OsmAnd-java/src/net/osmand/router/RoutingConfiguration.java index ccadfc0ebc..037cd619cd 100644 --- a/OsmAnd-java/src/net/osmand/router/RoutingConfiguration.java +++ b/OsmAnd-java/src/net/osmand/router/RoutingConfiguration.java @@ -1,12 +1,17 @@ package net.osmand.router; +import gnu.trove.set.hash.TLongHashSet; + import java.io.IOException; import java.io.InputStream; +import java.util.ArrayList; import java.util.LinkedHashMap; +import java.util.List; import java.util.Map; import java.util.Stack; import net.osmand.PlatformUtil; +import net.osmand.binary.RouteDataObject; import net.osmand.router.GeneralRouter.GeneralRouterProfile; import net.osmand.router.GeneralRouter.RouteAttributeContext; import net.osmand.router.GeneralRouter.RouteDataObjectAttribute; @@ -45,12 +50,18 @@ public class RoutingConfiguration { public float recalculateDistance = 10000f; - public static class Builder { // Design time storage private String defaultRouter = ""; private Map routers = new LinkedHashMap(); private Map attributes = new LinkedHashMap(); + private TLongHashSet impassableRoadIds = new TLongHashSet(); + private List impassableRoads = new ArrayList(); + + // Example +// { +// impassableRoadIds.add(23000069L); +// } public RoutingConfiguration build(String router, int memoryLimitMB) { return build(router, null, memoryLimitMB, null); @@ -76,6 +87,7 @@ public class RoutingConfiguration { i.initialDirection = direction; i.recalculateDistance = parseSilentFloat(getAttribute(i.router, "recalculateDistanceHelp"), i.recalculateDistance) ; i.heuristicCoefficient = parseSilentFloat(getAttribute(i.router, "heuristicCoefficient"), i.heuristicCoefficient); + i.router.addImpassableRoads(impassableRoadIds); i.ZOOM_TO_LOAD_TILES = parseSilentInt(getAttribute(i.router, "zoomToLoadTiles"), i.ZOOM_TO_LOAD_TILES); int desirable = parseSilentInt(getAttribute(i.router, "memoryLimitInMB"), 0); if(desirable != 0) { @@ -92,6 +104,21 @@ public class RoutingConfiguration { return i; } + + public List getImpassableRoads() { + return impassableRoads; + } + + public TLongHashSet getImpassableRoadIds() { + return impassableRoadIds; + } + + public void addImpassableRoad(RouteDataObject r) { + impassableRoadIds.add(r.id); + impassableRoads.add(r); + } + + private String getAttribute(VehicleRouter router, String propertyName) { if (router.containsAttribute(propertyName)) { return router.getAttribute(propertyName); diff --git a/OsmAnd/res/drawable-hdpi/av_download.png b/OsmAnd/res/drawable-hdpi/av_download.png new file mode 100644 index 0000000000..805ae32444 Binary files /dev/null and b/OsmAnd/res/drawable-hdpi/av_download.png differ diff --git a/OsmAnd/res/drawable-hdpi/av_upload.png b/OsmAnd/res/drawable-hdpi/av_upload.png new file mode 100644 index 0000000000..7883023691 Binary files /dev/null and b/OsmAnd/res/drawable-hdpi/av_upload.png differ diff --git a/OsmAnd/res/drawable-mdpi/av_download.png b/OsmAnd/res/drawable-mdpi/av_download.png index 678ecfad45..91c4c44a14 100644 Binary files a/OsmAnd/res/drawable-mdpi/av_download.png and b/OsmAnd/res/drawable-mdpi/av_download.png differ diff --git a/OsmAnd/res/drawable-mdpi/av_upload.png b/OsmAnd/res/drawable-mdpi/av_upload.png index 9e3f74504f..d8b1f7f9a2 100644 Binary files a/OsmAnd/res/drawable-mdpi/av_upload.png and b/OsmAnd/res/drawable-mdpi/av_upload.png differ diff --git a/OsmAnd/res/drawable-xhdpi/av_download.png b/OsmAnd/res/drawable-xhdpi/av_download.png new file mode 100644 index 0000000000..6b1ee162d4 Binary files /dev/null and b/OsmAnd/res/drawable-xhdpi/av_download.png differ diff --git a/OsmAnd/res/drawable-xhdpi/av_upload.png b/OsmAnd/res/drawable-xhdpi/av_upload.png new file mode 100644 index 0000000000..24ba3fed85 Binary files /dev/null and b/OsmAnd/res/drawable-xhdpi/av_upload.png differ diff --git a/OsmAnd/res/drawable-xxhdpi/av_download.png b/OsmAnd/res/drawable-xxhdpi/av_download.png new file mode 100644 index 0000000000..4ae7e1c4d9 Binary files /dev/null and b/OsmAnd/res/drawable-xxhdpi/av_download.png differ diff --git a/OsmAnd/res/drawable-xxhdpi/av_upload.png b/OsmAnd/res/drawable-xxhdpi/av_upload.png new file mode 100644 index 0000000000..a4084e1798 Binary files /dev/null and b/OsmAnd/res/drawable-xxhdpi/av_upload.png differ diff --git a/OsmAnd/res/layout/gl_surface.xml b/OsmAnd/res/layout/gl_surface.xml new file mode 100644 index 0000000000..5a93699ddb --- /dev/null +++ b/OsmAnd/res/layout/gl_surface.xml @@ -0,0 +1,7 @@ + + + + \ No newline at end of file diff --git a/OsmAnd/res/layout/main.xml b/OsmAnd/res/layout/main.xml index f10d26a96a..6d54fed7de 100644 --- a/OsmAnd/res/layout/main.xml +++ b/OsmAnd/res/layout/main.xml @@ -12,11 +12,11 @@ android:keepScreenOn="true" android:orientation="vertical" > - + Сэрвіс OsMo не даступны:\n- Праверце злучэньне;\n- Праверце налады;\n- Праверце наш Twitter: https://twitter.com/OsMomobi Ананімнаму карыстальніку недаступна:\n- Стварэньне групаў;\n- Сінхранізацыя групаў і прыстасаваньняў з серверам;\n- Кіраваньне групамі і прыстасаваньнямі ў асабістым кабінеце. Пачаць працу з натыўнай візуалізацыяй + Настройка мапы + Паблізу ад diff --git a/OsmAnd/res/values-cs/strings.xml b/OsmAnd/res/values-cs/strings.xml index 259ed7f65a..419c7f4fd0 100644 --- a/OsmAnd/res/values-cs/strings.xml +++ b/OsmAnd/res/values-cs/strings.xml @@ -1746,4 +1746,9 @@ s často kladenými otázkami. Jméno oblíbeného bodu bylo změněno na %1$s, aby bylo možné uložit název emotikonu do souboru. Tolerance překročení rychlosti Zvolte toleranci překročení povolené rychlosti, po které uslyšíte hlasové varování. + Zařízení nenalezeno + Služba OsMo není k dispozici:\n- zkontrolujte připojení;\n- zkontrolujte nastavení;\n- podívejte se na náš Twitter: https://twitter.com/OsMomobi + Anonymní uživatel nemůže:\n- vytvářet skupiny;\n- synchronizovat skupiny a zařízení se serverem;\n- manage groups and devices in a private office. + Anonymní uživatel + Přihlášen jako %1$s diff --git a/OsmAnd/res/values-da/strings.xml b/OsmAnd/res/values-da/strings.xml index 8e1951a8a9..4ef84d261e 100644 --- a/OsmAnd/res/values-da/strings.xml +++ b/OsmAnd/res/values-da/strings.xml @@ -840,7 +840,7 @@ Nogle af de centrale funktioner: m Forældet kortdataformat \'{0}\' er ikke understøttet Nærmeste interessepunkt - Tilpasset filter + Brugerdefineret filter Online navne-søger Læser cachelagrede delkort… Ikke nok hukommelse for indeks \'{0}\' @@ -879,7 +879,7 @@ Nogle af de centrale funktioner: \n\nFor at få kørselsvejledning til destinationen fra et andet punkt end den aktuelle position, vælges det på kortet, og tryk \'Kørselsvejledning fra\'. \n\nVælg enten \'Begynd navigation\', hvilket betyder, at OsmAnd giver vejledning og talte instruktioner (hvis aktiveret) mv. Eller vælg \'Vis rute\', hvilket resulterer i statisk rute uden vejledning eller justeringer, mens du flytter. \n\nBruges \'Kørselsvejledning fra\' sammen med \'Begynd navigation\', vil OsmAnd skifte til den faktiske position, så snart den er fundet (dette kan bruges til at komme hurtigt i gang med rutevejledning før positionen findes), mens \'Kørselsvejledning fra\' i kombination med \'Vis rute\' kun viser ruten fra ethvert vilkårligt valgt punkt uden efterfølgende opdateringer.\nHvis du bruger \"Kørselsvejledning fra \'sammen med\' Start navigation\", vil Osmand så hurtigt skifte til din aktuelle position som det findes (så dette kan bruges til at kickstarte routing før positionen er fundet), mens \"Kørselsvejledning fra \'i kombination med \'Vis rute\' bare viser dig ruten fra enhver vilkårlig punkt, du havde valgt uden efterfølgende opdateringer. " - Brug af landområder + Arealanvendelse Mad og drikke Talevejledning er ikke tilgængelig. Gå til \'Indstillinger - Datahåndtering\', vælg den ønskede stemmepakke og hent den. {0} enheder valgt @@ -1832,12 +1832,14 @@ Nogle af de centrale funktioner: Brug indbygget optegning Brug C++ optegning i stedet for Java Udskriv rute - Favoritnavn er ændret til %1$s for korrekt at kan gemme strengen med humørikoner til en fil. + Favoritnavn er ændret til %1$s for at kunne gemme navnet med humørikoner til en fil. Tolerance for hastighedsgrænse - Vælg hastighedsgrænse tolerancen, over hvilken du vil modtage en stemme advarsel. + Vælg hvor meget hastighedsgrænsen skal overskrides, for at få en stemmeadvarsel. Enheden blev ikke fundet - OsMo tjenesten er ikke tilgængelig:\n- check forbindelsen;\n- kontrollere indstillingerne;\n- Tjek vores Twitter: https://twitter.com/OsMomobi - En anonym bruger kan ikke:\n- oprette grupper;\n- synkronisere grupper og enheder med serveren;\n- administrere grupper og enheder i et privat kontor. + OsMo tjenesten er ikke tilgængelig:\n- kontrollere forbindelsen;\n- kontrollere indstillingerne;\n- se på Twitter: https://twitter.com/OsMomobi + En anonym bruger kan ikke:\n- oprette grupper;\n- synkronisere grupper og enheder med serveren;\n- administrere grupper og enheder i et privat område. Anonym bruger Logget ind som %1$s - + Konfigurer kort + I nærheden af + diff --git a/OsmAnd/res/values-de/strings.xml b/OsmAnd/res/values-de/strings.xml index 53e643dcf5..e2fe7a10dc 100644 --- a/OsmAnd/res/values-de/strings.xml +++ b/OsmAnd/res/values-de/strings.xml @@ -1970,7 +1970,7 @@ Afghanistan, Ägypten, Albanien, Algerien, Andorra, Angola, Anguilla, Antigua an Ziele Verkehrswarnungen Speichern Sie Ihre Tracks mit einem Klick. Zeigt die Einstellung, wie Strecken aufgezeichnet werden – in lokale GPX-Dateien oder online via Web-Service. - + Antippen eines Elements um mehr Details zu erfahren, Tippen und Halten zum Deaktivieren oder Löschen des Elements. Aktuell auf dem Gerät vorhandene Daten (%1$s frei): Karten-Schriftgröße festlegen Schriftgröße @@ -1984,4 +1984,9 @@ Afghanistan, Ägypten, Albanien, Algerien, Andorra, Angola, Anguilla, Antigua an Route drucken Toleranz für Tempolimit Schwellenwert für Warnung bei Überschreiten der Höchstgeschwindigkeit. - + Gerät wurde nicht gefunden + OsMo-Dienst ist nicht verfügbar:\n- bitte Verbindung prüfen;\n- bitte Einstellungen prüfen;\n- ggf. Meldung auf Twitter: https://twitter.com/OsMomobi + Anonymer Benutzer + angemeldet als %1$s + Anynyme Benutzer können nicht::\n- Gruppen bilden;\n- Synchronisieren von Gruppen und Geräten auf dem Server;\n- Verwalten von Gruppen und Geräten im Privatbereich. + diff --git a/OsmAnd/res/values-el/strings.xml b/OsmAnd/res/values-el/strings.xml index d6cdc4790f..d44f5ba165 100644 --- a/OsmAnd/res/values-el/strings.xml +++ b/OsmAnd/res/values-el/strings.xml @@ -1673,4 +1673,7 @@ Κάμερα ταχύτητας Ορίστε το μέγεθος του κειμένου στο χάρτη. Μέγεθος κειμένου - + Η συσκευή δεν βρέθηκε + Ανώνυμος χρήστης + Συνδεδεμένος ως %1$s + diff --git a/OsmAnd/res/values-es/strings.xml b/OsmAnd/res/values-es/strings.xml index 18642f917d..1202c8f859 100644 --- a/OsmAnd/res/values-es/strings.xml +++ b/OsmAnd/res/values-es/strings.xml @@ -1549,7 +1549,7 @@ Afganistán, Albania, Alemania, Andorra, Angola, Anguila, Antigua y Barbuda, Ant Evitar autopistas Evita las autopistas Límite de peso - Indicar peso del vehículo permitido en rutas + Indicar el peso del vehículo permitido en rutas Desde la versión Android KitKat (4.4), no puedes descargar ni actualizar el mapa en el anterior lugar de almacenamiento (%s). ¿Quieres cambiar a una nueva localización permitida y copiar todos los archivos allí? \n Nota: los archivos antiguos permanecerán intactos. \n Nota: no será posible compartir archivos entre OsmAnd y OsmAnd+. @@ -1882,9 +1882,9 @@ Afganistán, Albania, Alemania, Andorra, Angola, Anguila, Antigua y Barbuda, Ant Nombre de punto favorito duplicado Hemos cambiado el nombre de tu punto favorito a %1$s para evitar nombres duplicados. Probar renderización nativa - Iniciar actividad con renderización nativa + Iniciar la actividad con renderización nativa Usar renderización nativa - Usar C++ para la renderización en vez de Java + Usar el renderizado C++ en lugar de Java Imprimir ruta El nombre de punto favorito ha sido cambiado a %1$s para facilitar el guardado de la cadena con emoticonos a un archivo. Tolerancia de límite de velocidad diff --git a/OsmAnd/res/values-fr/strings.xml b/OsmAnd/res/values-fr/strings.xml index 288f6e9f0a..baa41b22df 100644 --- a/OsmAnd/res/values-fr/strings.xml +++ b/OsmAnd/res/values-fr/strings.xml @@ -1833,4 +1833,9 @@ Afghanistan, Albanie, Algérie, Allemagne, Andorre, Angola, Anguilla, Antigua-et Le nom de votre favoris sera %1$s car il n\'est pas possible d\'utiliser les émoticônes. Marge tolérée aux limites de vitesse Indiquez la marge à tolérer aux limitations de vitesse avant le déclenchement des annonces vocales. + Périphérique introuvable + Le service OsMo n\'est pas disponible :\n- Vérifier la connexion;\n- Vérifier les paramètres;\n- Vérifier notre Twitter: https://twitter.com/OsMomobi + Un utilisateur anonyme ne peut pas :\n- Créer des groupes;\n- Synchroniser les groupes et les périphériques avec le serveur;\n- Gérer les groupes et les périphériques dans un espace privé. + Utilisateur anonyme + Connecté entant que %1$s diff --git a/OsmAnd/res/values-hu/strings.xml b/OsmAnd/res/values-hu/strings.xml index a454b2bd6a..1b4aa04de9 100644 --- a/OsmAnd/res/values-hu/strings.xml +++ b/OsmAnd/res/values-hu/strings.xml @@ -1782,4 +1782,9 @@ Válaszd ki, mekkora sebességtúllépésnél szeretnél figyelmeztetést hallani. A kedvenc hely neve módosítva lett erre: %1$s, lehetővé téve a hangulatjeleket tartalmazó szöveg fájlba mentését. Útvonal nyomtatása - + Eszköz nem található + Az OsMo szolgáltatás nem elérhető:\n- ellenőrizd az internetkapcsolatot;\n- ellenőrizd a beállításokat;\n- nézz rá a Twitterünkre: https://twitter.com/OsMomobi + Egy anonim felhasználó nem tud:\n- csoportot létrehozni;\n- csoportokat és eszközöket szinkronizálni a szerverrel;\n- csoportokat és eszközöket kezelni privát módon. + Anonim felhasználó + Bejelentkezve mint %1$s + diff --git a/OsmAnd/res/values-it/strings.xml b/OsmAnd/res/values-it/strings.xml index 0f0aa39bd2..c7fed2308d 100644 --- a/OsmAnd/res/values-it/strings.xml +++ b/OsmAnd/res/values-it/strings.xml @@ -163,7 +163,7 @@ Esiste già un file con lo stesso nome. Salva Salva direzioni - Invio dei file GPX alla comunità OSM. Lo utilizzeranno per migliorare le mappe. + Invio dei file GPX alla comunità OSM. Verranno utilizzati per migliorare le mappe. Oggetto(i) %1$d di %2$d caricato(i) correttamente. Invia ad OSM Visualizza più dettagli mappa @@ -289,15 +289,14 @@ \n\nPer ricevere indicazioni partendo da un punto diverso alla tua posizione attuale, seleziona il punto voluto sulla mappa e scegli \'Indicazioni da\'. \n\nSe usi \'Indicazioni da\' insieme ad \'Avvia navigazione\', OsmAnd passerà alla tua posizione attuale on appena essa sarà disponibile (questo modo è stato studiato proprio per permettere di avviare immediatamente la navigazione ancor prima che la posizione sia stata individuata), mentre \'Indicazioni da\' insieme a \'Mostra percorso\' calcola il percorso da un punto arbitrario senza effettuare alcun aggiornamento. " Ricerca - Puoi cercare i luoghi direttamente sulla mappa attraverso \'Utilizza la posizione\' → \'Cerca nelle vicinanze\', oppure andando in \'Menu\' → \'Ricerca\'. - \n\nLa schermata di ricerca fornisce varie schede per effettuare ricerche - \n\tper indirizzo - \n\tdalle coordinate - \n\tda un PDI (dal tipo o dal nome) - \n\tdalla tua cronologia ricerche - \n\toppure fra i tuoi preferiti. - \n\nPer ogni risultato un menù contestuale permetterà di scegliere tra \'Indicazioni\' o \'Visualizza nella mappa\', etc. - + "Puoi cercare i luoghi direttamente sulla mappa attraverso \'Utilizza la posizione\' → \'Cerca nelle vicinanze\', oppure andando in \'Menu\' → \'Ricerca\'. +\n\nLa schermata di ricerca fornisce varie schede per effettuare ricerche +\n\tper indirizzo +\n\tdalle coordinate +\n\tda un PDI (dal tipo o dal nome) +\n\tdalla tua cronologia ricerche +\n\toppure fra i tuoi preferiti. +\n\nPer ogni risultato un menù contestuale permetterà di scegliere tra \'Indicazioni per\' o \'Visualizza nella mappa\', etc. " Menu \'Utilizza la posizione\' Il menu contestuale \'Utilizza la posizione…\' mostra tutte le azioni possibili per un punto (posizione). \n\nViene visualizzato selezionando a lungo sulla mappa, premendo il pulsante trackball o selezionando \'Menù\' → \'Utilizza la posizione…\' (gli ultimi due modi prendono il centro della mappa come riferimento). @@ -1661,7 +1660,7 @@ Si consiglia di aggiungere uno o più punti intermedi per migliorarne le prestaz Evita le autostrade Evita le autostrade Limite di peso - Specifica il limite di peso del veicolo + Specifica il peso del veicolo permesso sul percorso Scegli GPX… Scegli la destinazione Scegli sulla mappa… @@ -1914,7 +1913,7 @@ Si consiglia di aggiungere uno o più punti intermedi per migliorarne le prestaz Nomi locali Swahili Avanti - Home + Casa Invia il tracciamento a un specifico servizio web se la registrazione GPX è abilitata. Tracciamento online (GPX richiesto) Avvia il tracciamento online @@ -1941,12 +1940,12 @@ Si consiglia di aggiungere uno o più punti intermedi per migliorarne le prestaz Per favore specifica l\'id Prosegui la navigazione Metti in pausa la navigazione - Vista escursionismo alpino + Scala escursionismo alpino (SAC) Disegna i sentieri in base alla scala SAC Strato simboli escursionistici Disegna i percorsi in base alle tracce OSMC - Edifici colorati + Edifici colorati per tipologia Presto Normale Tardi diff --git a/OsmAnd/res/values-sk/strings.xml b/OsmAnd/res/values-sk/strings.xml index 3e1f5ec120..061418cedb 100644 --- a/OsmAnd/res/values-sk/strings.xml +++ b/OsmAnd/res/values-sk/strings.xml @@ -2004,4 +2004,9 @@ Afganistan, Albánsko, Alžírsko, Andora, Angola, Anguilla, Antigua a Barbuda, Vytlačiť trasu Tolerancia prekročenia povolenej rýchlosti Zvoľte toleranciu prekročenia povolenej rýchlosti, po ktorej dostanete hlasové oznámenie. - + Zariadenie sa nenašlo + Anonymný používateľ + Prihlásený ako %1$s + Služba OsMo nie je dostupná:\n- skontrolujte pripojenie;\n- skontrolujte nastavenie;\n- pozrite na náš Twitter: https://twitter.com/OsMomobi + Anonymný používateľ nemôže:\n- vytvárať skupiny;\n- synchronizovať skupiny a zariadenia so serverom;\n- spravovať skupiny a zariadenia v súkromnej kancelárii. + diff --git a/OsmAnd/res/values-sv/strings.xml b/OsmAnd/res/values-sv/strings.xml index bf56754efd..8ade5fd188 100644 --- a/OsmAnd/res/values-sv/strings.xml +++ b/OsmAnd/res/values-sv/strings.xml @@ -1713,4 +1713,6 @@ En anonym användare kan inte:\n- skapa grupper;\n- synkronisera grupper och enheter med servern;\n- hantera grupper och enheter i ett privat kontor. Anonym användare Inloggad som %1$s - + Konfigurera karta + I närheten av + diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java index 92dbd7e47d..282166649f 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java @@ -68,6 +68,7 @@ import android.view.KeyEvent; import android.view.MotionEvent; import android.view.View; import android.view.ViewGroup.LayoutParams; +import android.view.ViewStub; import android.view.Window; import android.widget.FrameLayout; import android.widget.ProgressBar; @@ -139,8 +140,8 @@ public class MapActivity extends AccessibleActivity { parseLaunchIntentLocation(); if(settings.USE_NATIVE_RENDER.get() && NativeQtLibrary.isInit()) { - glSurfaceView = (GLSurfaceView) findViewById(R.id.glSurfaceView); - glSurfaceView.setVisibility(View.VISIBLE); + ViewStub stub = (ViewStub) findViewById(R.id.glSurfaceStub); + glSurfaceView = (GLSurfaceView) stub.inflate(); OsmAndMapLayersView ml = (OsmAndMapLayersView) findViewById(R.id.MapLayersView); ml.setVisibility(View.VISIBLE); NativeQtLibrary.initView(glSurfaceView); diff --git a/OsmAnd/src/net/osmand/plus/helpers/WaypointDialogHelper.java b/OsmAnd/src/net/osmand/plus/helpers/WaypointDialogHelper.java index 0596c6e968..db8f506de3 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/WaypointDialogHelper.java +++ b/OsmAnd/src/net/osmand/plus/helpers/WaypointDialogHelper.java @@ -32,6 +32,7 @@ import android.view.View; import android.view.ViewGroup; import android.widget.AdapterView; import android.widget.ArrayAdapter; +import android.widget.CompoundButton; import android.widget.FrameLayout; import android.widget.ImageButton; import android.widget.ImageView; diff --git a/OsmAnd/src/net/osmand/plus/render/RendererRegistry.java b/OsmAnd/src/net/osmand/plus/render/RendererRegistry.java index 114d2287e6..d5afedf332 100644 --- a/OsmAnd/src/net/osmand/plus/render/RendererRegistry.java +++ b/OsmAnd/src/net/osmand/plus/render/RendererRegistry.java @@ -134,7 +134,7 @@ public class RendererRegistry { InputStream is = null; if("default".equalsIgnoreCase(name)) { name = DEFAULT_RENDER; - } + } if(externalRenderers.containsKey(name)){ is = new FileInputStream(externalRenderers.get(name)); } else if(internalRenderers.containsKey(name)){ diff --git a/OsmAnd/src/net/osmand/plus/render/TextRenderer.java b/OsmAnd/src/net/osmand/plus/render/TextRenderer.java index 81da950309..b1d6d09611 100644 --- a/OsmAnd/src/net/osmand/plus/render/TextRenderer.java +++ b/OsmAnd/src/net/osmand/plus/render/TextRenderer.java @@ -241,13 +241,15 @@ public class TextRenderer { paintText.setColor(text.textShadowColor); paintText.setStyle(Style.STROKE); paintText.setStrokeWidth(2 + text.textShadow); - cv.drawTextOnPath(text.text, text.drawOnPath, 0, text.vOffset, paintText); + cv.drawTextOnPath(text.text, text.drawOnPath, 0, + text.vOffset - ( paintText.ascent()/2 + paintText.descent()), paintText); // reset paintText.setStyle(Style.FILL); paintText.setStrokeWidth(2); paintText.setColor(text.textColor); } - cv.drawTextOnPath(text.text, text.drawOnPath, 0, text.vOffset, paintText); + cv.drawTextOnPath(text.text, text.drawOnPath, 0, + text.vOffset - ( paintText.ascent()/2 + paintText.descent()), paintText); } else { if (text.shieldRes != null) { float coef = rc.getDensityValue(rc.screenDensityRatio * rc.textScale); @@ -513,7 +515,6 @@ public class TextRenderer { p.centerX = points[startInd].x + scale * px + ox; p.centerY = points[startInd].y + scale * py + oy; - p.vOffset += p.textSize / 2 - 1; // p.hOffset = 0; if (inverse) {