Merge branch 'master' of ssh://github.com/osmandapp/Osmand into splash_screen

This commit is contained in:
PavelRatushny 2017-07-20 13:34:18 +03:00
commit 29ebf1aba4
97 changed files with 698 additions and 424 deletions

View file

@ -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);
}

View file

@ -26,5 +26,10 @@
<string name="twitter_address">https://twitter.com/osmandapp</string>
<string name="facebook_address">https://www.facebook.com/osmandapp</string>
<string name="vk_address">https://vk.com/osmandapp</string>
<string name="default_changeset_add">Add</string>
<string name="default_changeset_edit">Edit</string>
<string name="default_changeset_delete">Delete</string>
<string name="default_changeset_reopen">Reopen</string>
<string name="items_modified">items modified</string>
</resources>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.4 KiB

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View file

@ -2569,8 +2569,8 @@
<string name="driving_region_automatic">آلي</string>
<string name="parking_options">خيارات مواقف السيارات</string>
<string name="full_version_thanks">شكرا لكم لاقتناء النسخة الكاملة من أوسماند !</string>
<string name="routing_attr_driving_style_speed_name">السرعة</string>
<string name="routing_attr_driving_style_safety_name">الأمان</string>
<string name="routing_attr_driving_style_speed_name">تفضيل الطرق الرئيسية</string>
<string name="routing_attr_driving_style_safety_name">تفضيل الشوارع الجانبية</string>
<string name="gpx_track">المسار</string>
<string name="select_gpx_folder">إختر مجلد المسار</string>
<string name="shared_string_tracks">المسارات</string>

View file

@ -904,4 +904,5 @@
<string name="storage_directory_card">Składowanska karta</string>
<string name="coords_format">Format koordinatow</string>
<string name="coords_format_descr">Format za geografiske koordinaty</string>
<string name="mapillary">Mapillary</string>
</resources>

View file

@ -701,7 +701,7 @@ Memòria proporcional %4$s MB (límit de l\'Android %5$s MB, Dalvik %6$s MB).</s
<string name="target_point">Destinació %1$s</string>
<string name="target_points">Destinacions</string>
<string name="intermediate_point_too_far">La fita %1$s és massa lluny de la carretera més propera.</string>
<string name="arrived_at_intermediate_point">Heu arribat a la vostra fita</string>
<string name="arrived_at_intermediate_point">Heu arribat a la vostra destinació intermèdia</string>
<string name="context_menu_item_intermediate_point">Afegeix com una fita</string>
<string name="map_widget_intermediate_distance">Fita</string>
<string name="ending_point_too_far">El punt final és massa lluny de la carretera més propera.</string>

View file

@ -2554,9 +2554,9 @@ Pokud potřebujete pomoci s aplikací OsmAnd, prosím kontaktujte naši podporu
<string name="routing_attr_relief_smoothness_factor_hills_name">Kopcovitý</string>
<string name="routing_attr_relief_smoothness_factor_plains_name">Méně kopcovitý</string>
<string name="routing_attr_relief_smoothness_factor_more_plains_name">Rovinatý</string>
<string name="routing_attr_driving_style_speed_name">Rychlý</string>
<string name="routing_attr_driving_style_speed_name">Preferovat hlavní silnice</string>
<string name="routing_attr_driving_style_balance_name">Vyvážený</string>
<string name="routing_attr_driving_style_safety_name">Bezpečný</string>
<string name="routing_attr_driving_style_safety_name">Preferovat vedlejší silnice</string>
<string name="relief_smoothness_factor_descr">Priorita terénu: rovinatý nebo kopcovitý</string>
<string name="shared_string_slope">Svah</string>
<string name="lang_ber">Berbersky</string>

View file

@ -2651,7 +2651,7 @@ Repræsenterer område: %1$s x %2$s</string>
<string name="routing_attr_relief_smoothness_factor_hills_name">Kuperet</string>
<string name="routing_attr_relief_smoothness_factor_plains_name">Mindre kuperet</string>
<string name="routing_attr_relief_smoothness_factor_more_plains_name">Fladt</string>
<string name="routing_attr_driving_style_speed_name">Foretræk større veje</string>
<string name="routing_attr_driving_style_speed_name">Accepter større veje</string>
<string name="routing_attr_driving_style_balance_name">Balanceret</string>
<string name="routing_attr_driving_style_safety_name">Foretrækk sideveje</string>
<string name="relief_smoothness_factor_descr">Foretruknet terræn: fladt eller kuperet</string>
@ -2808,6 +2808,6 @@ Tidligere destination bliver sidste mellemliggende punkt.</string>
<string name="quick_action_resume_pause_navigation">Genoptag/pause navigation</string>
<string name="quick_action_resume_pause_navigation_descr">Tryk på knappen pause navigation eller genoptag, hvis den allerede var sat på pause.</string>
<string name="quick_action_show_navigation_finish_dialog">Vis Afslut navigation dialog</string>
<string name="quick_action_start_stop_navigation">Start/slut Navigation</string>
<string name="quick_action_start_stop_navigation_descr">Tryk på knappen for at starte navigationen eller stoppe den, hvis den allerede var begyndt.</string>
<string name="quick_action_start_stop_navigation">Start/slut navigation</string>
<string name="quick_action_start_stop_navigation_descr">Tryk på knappen for at starte navigation eller stoppe, hvis den allerede var begyndt.</string>
</resources>

View file

@ -3410,4 +3410,9 @@
<string name="poi_animal_shelter_mammal">Säugetiere</string>
<string name="poi_animal_shelter_fish">Fische</string>
<string name="poi_animal_shelter_type">Tierannahme</string>
<string name="poi_animal_shelter_purpose">Bestimmung</string>
<string name="poi_owner">Eigentümer</string>
</resources>

View file

@ -2487,7 +2487,7 @@ Indikas lokon: %1$s x %2$s"</string>
<string name="routing_attr_relief_smoothness_factor_hills_name">Malebena</string>
<string name="routing_attr_relief_smoothness_factor_plains_name">Malpli ebena</string>
<string name="routing_attr_relief_smoothness_factor_more_plains_name">Ebena</string>
<string name="routing_attr_driving_style_speed_name">Preferi ĉefajn vojojn</string>
<string name="routing_attr_driving_style_speed_name">Akcepti ĉefajn vojojn</string>
<string name="routing_attr_driving_style_balance_name">Ekvilibra</string>
<string name="routing_attr_driving_style_safety_name">Preferi flankajn vojojn</string>
<string name="routing_attr_relief_smoothness_factor_name">Elekti nivel-ombruman glatecon</string>

View file

@ -2644,9 +2644,9 @@ représentant la zone : %1$s x %2$s</string>
<string name="routing_attr_relief_smoothness_factor_hills_name">Vallonné</string>
<string name="routing_attr_relief_smoothness_factor_plains_name">Moins vallonné</string>
<string name="routing_attr_relief_smoothness_factor_more_plains_name">Plat</string>
<string name="routing_attr_driving_style_speed_name">Rapide</string>
<string name="routing_attr_driving_style_speed_name">Privilégier les routes principales</string>
<string name="routing_attr_driving_style_balance_name">Équilibré</string>
<string name="routing_attr_driving_style_safety_name">Sûre</string>
<string name="routing_attr_driving_style_safety_name">Privilégier les routes secondaires</string>
<string name="full_version_thanks">Merci d\'avoir acheté la version complète d\'OsmAnd !</string>
<string name="routing_attr_relief_smoothness_factor_name">Sélectionnez les préférences de relief</string>
<string name="parking_options">Choix de stationnement</string>

View file

@ -1213,4 +1213,9 @@
<string name="mapillary_menu_edit_text_hint">הקלדת שם משתמש</string>
<string name="mapillary_menu_descr_username">הצגת תמונות שנוספו על ידי משתמש מסוים.</string>
<string name="mapillary_menu_title_username">שם משתמש</string>
<string name="mapillary_menu_filter_description">אפשר לסנן תמונות לפי השולח או לפי תאריך. המסננים חלים רק על תקריב בגודל מסוים.</string>
<string name="map_widget_ruler_control">מד זווית</string>
<string name="shared_string_permissions">הרשאות</string>
<string name="import_gpx_failed_descr">ל־OsmAnd אין אפשרות לייבא את הקובץ. נא לוודא של־OsmAnd יש הרשאה לקרוא קבצים מהמיקום הזה.</string>
<string name="distance_moving">המרחק תוקן</string>
</resources>

View file

@ -201,7 +201,7 @@
<string name="poi_craft_electrician">Villanyszerelő</string>
<string name="poi_craft_gardener">Kertész</string>
<string name="poi_craft_jeweller">Ékszerész</string>
<string name="poi_craft_locksmith">Lakatos</string>
<string name="poi_craft_locksmith">Zárlakatos</string>
<string name="poi_craft_key_cutter">Kulcsmásoló</string>
<string name="poi_craft_photographer">Fényképész</string>
<string name="poi_craft_photographic_laboratory">Fotólabor</string>
@ -456,7 +456,7 @@
<string name="poi_swimming">Úszás</string>
<string name="poi_tennis">Tenisz</string>
<string name="poi_archaeological_site">Régészeti lelőhely</string>
<string name="poi_battlefield">Csatamező</string>
<string name="poi_battlefield">Csatatér</string>
<string name="poi_boundary_stone">Határkő</string>
<string name="poi_historic_cannon">Történelmi ágyú</string>
<string name="poi_rune_stone">Rúnakő</string>
@ -1358,7 +1358,7 @@
<string name="poi_memorial_plaque">Emléktábla</string>
<string name="poi_memorial_statue">Szobor</string>
<string name="poi_memorial_stone"></string>
<string name="poi_memorial_stele">Sztélé</string>
<string name="poi_memorial_stele">Kopjafa, sztélé</string>
<string name="poi_memorial_bust">Mellszobor</string>
<string name="poi_memorial_vehicle">Jármű</string>
<string name="poi_memorial_obelisk">Obeliszk</string>
@ -1689,7 +1689,7 @@
<string name="poi_artwork_type_mosaic">Műalkotás típusa: mozaik</string>
<string name="poi_artwork_type_relief">Műalkotás típusa: dombormű</string>
<string name="poi_artwork_type_graffiti">Műalkotás típusa: graffiti</string>
<string name="poi_artwork_type_stele">Műalkotás típusa: sztélé</string>
<string name="poi_artwork_type_stele">Műalkotás típusa: kopjafa, sztélé</string>
<string name="poi_artwork_type_fountain">Műalkotás típusa: szökőkút</string>
<string name="poi_width">Szélesség</string>
@ -3410,4 +3410,20 @@
<string name="poi_owner">Tulajdonos</string>
<string name="poi_animal_shelter_type">Fogadott állatok</string>
<string name="poi_animal_shelter_purpose">Cél</string>
<string name="poi_animal_shelter_wildlife">Vadon élő</string>
<string name="poi_animal_shelter_horse"></string>
<string name="poi_animal_shelter_mammal">Emlős</string>
<string name="poi_animal_shelter_fish">Hal</string>
<string name="poi_animal_shelter_purpose_adoption_yes">Örökbeadás</string>
<string name="poi_animal_shelter_purpose_adoption_no">Nem adnak örökbe</string>
<string name="poi_animal_shelter_purpose_release_yes">Szabadon engedés</string>
<string name="poi_animal_shelter_purpose_release_no">Nem engedik szabadon</string>
<string name="poi_spaceport">Űrrepülőtér</string>
<string name="poi_lock_basin">Zsilipmedence</string>
</resources>

View file

@ -1,4 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><resources>
<?xml version='1.0' encoding='UTF-8'?>
<resources>
<string name="use_fluorescent_overlays">Sovrapposizioni fluorescenti</string>
<string name="use_fluorescent_overlays_descr">Usa colori fluorescenti per visualizzare tracce e percorsi</string>
<string name="offline_edition">Modifiche offline</string>
@ -1220,7 +1221,7 @@ I dati globali (fra i 70 gradi nord e 70 gradi sud) sono basati su misurazioni d
<string name="app_mode_boat">Barca</string>
<string name="app_mode_aircraft">Aereo</string>
<string name="map_widget_map_rendering">Disegno della mappa</string>
<string name="app_modes_choose_descr">Scegli fra le modalità d\'uso disponibili dell\'applicazione</string>
<string name="app_modes_choose_descr">Scegli i profili d\'uso del l\'applicazione da rendere visibili</string>
<string name="app_modes_choose">Profili applicazione</string>
<string name="amenity_type_seamark">Mare</string>
@ -1327,14 +1328,11 @@ I dati globali (fra i 70 gradi nord e 70 gradi sud) sono basati su misurazioni d
<string name="navigation_intent_invalid">Formato non valido: %s</string>
<string name="osmo_settings_uuid">ID univoco del dispositivo</string>
<string name="osmo_settings_descr">Configura le impostazioni di monitoraggio e imposta il canale di monitoraggio personale</string>
<string name="osmo_plugin_description">"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
"</string>
<string name="osmo_plugin_description">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</string>
<string name="osmo_plugin_name">Monitoraggio OpenStreetMap</string>
<string name="osmo_settings">OsMO</string>
<string name="keep_informing_never">Solo manualmente (tap sulla freccia)</string>
@ -1702,7 +1700,7 @@ Le tracce registrate possono essere condivise con i tuoi amici o essere usate pe
<string name="world_ski_missing">Per visualizzare le mappe per lo sci è necessario scaricare la mappa speciale offline</string>
<string name="nautical_maps_missing">Per visualizzare le mappe nautiche è necessario scaricare la mappa speciale offline</string>
<string name="rendering_attr_pisteGrooming_name">Finitura della pista</string>
<string name="free">"Libera %1$s "</string>
<string name="free">Libera %1$s</string>
<string name="device_memory">Memoria dispositivo</string>
<string name="rendering_attr_pisteRoutes_name">Piste da sci</string>
<string name="roads_only">Solo strade</string>
@ -2002,7 +2000,7 @@ Attivando questa vista lo stile della mappa diventerà \'Inverno e sci\', mostra
<string name="are_you_sure">Sei sicuro?</string>
<string name="unsaved_changes_will_be_lost">Tutte le modifiche non salvate andranno perse. Continuare?</string>
<string name="simulate_your_location_stop_descr">Arresta la simulazione del percorso</string>
<string name="simulate_your_location_descr">Simula utilizzando un GPX registrato o una percorso calcolato</string>
<string name="simulate_your_location_descr">Simula la posizione utilizzando un GPX registrato o una percorso calcolato</string>
<string name="downloads_left_template">%1$s download rimanenti</string>
<string name="favourites_edit_dialog_title">Informazioni preferite</string>
<string name="favourites_context_menu_add">Aggiungi preferito</string>
@ -2141,33 +2139,31 @@ Attivando questa vista lo stile della mappa diventerà \'Inverno e sci\', mostra
<string name="please_specify_poi_type_only_from_list">Specifica il corretto tipo di PDI o salta questo passaggio</string>
<string name="routing_attr_avoid_stairs_name">Evita le scale</string>
<string name="routing_attr_avoid_stairs_description">Evita le scale</string>
<string name="release_2_2">"
• 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…
"</string>
<string name="release_2_2">\\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…</string>
<string name="dashboard_or_drawer_description">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.</string>
<string name="shared_string_near">Vicino</string>
<string name="shared_string_hide">Nascondi</string>
@ -2689,9 +2685,9 @@ Rappresenta l\'area: %1$s x %2$s</string>
<string name="routing_attr_relief_smoothness_factor_hills_name">Collinoso</string>
<string name="routing_attr_relief_smoothness_factor_plains_name">Meno collinoso</string>
<string name="routing_attr_relief_smoothness_factor_more_plains_name">Pianeggiante</string>
<string name="routing_attr_driving_style_speed_name">Velocità</string>
<string name="routing_attr_driving_style_speed_name">Preferisci le strade principali</string>
<string name="routing_attr_driving_style_balance_name">Bilanciato</string>
<string name="routing_attr_driving_style_safety_name">Sicuro</string>
<string name="routing_attr_driving_style_safety_name">Preferisci byways</string>
<string name="relief_smoothness_factor_descr">Terreno preferito: pianeggiante o collinoso</string>
<string name="routing_attr_relief_smoothness_factor_name">Seleziona la fluttuazione della quota</string>
<string name="driving_region_automatic">Automatica</string>
@ -2851,4 +2847,25 @@ Copertura e qualità approssimativamente:
<string name="store_tracks_in_monthly_directories">Salva le tracce registrate in cartelle mensili</string>
<string name="store_tracks_in_monthly_directories_descrp">Salva le tracce registrate in sottocartelle per mese di registrazione (come 2017-01).</string>
<string name="shared_string_reset">Reimposta</string>
<string name="quick_action_resume_pause_navigation_descr">Premi il pulsante per mettere in pausa la navigazione, oppure per riprenderla se è già in pausa.</string>
<string name="quick_action_show_navigation_finish_dialog">Mostra la finestra di dialogo Fine</string>
<string name="quick_action_start_stop_navigation">Inizio/Fine Navigazione</string>
<string name="quick_action_start_stop_navigation_descr">Premi questo pulsante per avviare la navigazione, o per fermarla se già avviata.</string>
<string name="rendering_value_translucent_pink_name">Rosa traslucido</string>
<string name="average">Media</string>
<string name="of">%1$d di %2$d</string>
<string name="ascent_descent">Guadagno/Perdita di quota</string>
<string name="moving_time">Tempo in movimento</string>
<string name="max_min">Max/Min</string>
<string name="min_max">Min/Max</string>
<string name="quick_action_resume_pause_navigation">Riprendi/Sospendi la Navigazione</string>
<string name="release_2_7">\\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</string>
</resources>

View file

@ -2637,4 +2637,9 @@
<string name="poi_motorcycle_services">Servìtzios</string>
<string name="poi_motorcycle_type">Casta de mototzicleta</string>
<string name="poi_animal_shelter_type">Animales atzetados</string>
<string name="poi_animal_shelter_purpose">Punna</string>
<string name="poi_spaceport">Portu ispatziale</string>
</resources>

View file

@ -2559,16 +2559,16 @@ Pro praghere iscrie su còdighe intreu</string>
<string name="points_delete_multiple">As a iscantzellare %1$d puntu/os. Seguru ses?</string>
<string name="track_points_category_name">Puntos importantes in custa àndala</string>
<string name="add_new_folder">Annanghe una cartella noa</string>
<string name="route_points_category_name">Puntos de colare in cust\'àndala</string>
<string name="route_points_category_name">Bortadas de colare in cust\'àndala</string>
<string name="shared_string_slope">Caladòrgia</string>
<string name="lang_ber">Bèrberu</string>
<string name="relief_smoothness_factor_descr">Terrinos preferidos: in paris o cun cùcuros</string>
<string name="routing_attr_relief_smoothness_factor_hills_name">Cùcuros/montigros</string>
<string name="routing_attr_relief_smoothness_factor_plains_name">Pagos cùcuros</string>
<string name="routing_attr_relief_smoothness_factor_more_plains_name">Terrinu in paris</string>
<string name="routing_attr_driving_style_speed_name">Lestru</string>
<string name="routing_attr_driving_style_speed_name">Privilègia sas istradas printzipales</string>
<string name="routing_attr_driving_style_balance_name">Bilantziadu</string>
<string name="routing_attr_driving_style_safety_name">Seguru</string>
<string name="routing_attr_driving_style_safety_name">Privilègia sas istradas segundàrias</string>
<string name="routing_attr_relief_smoothness_factor_name">Valore de variatzione de s\'artària</string>
<string name="full_version_thanks">Gràtzias pro àere comporadu sa versione intrea de OsmAnd!</string>
<string name="do_not_send_anonymous_app_usage">No imbies informatziones anònimas a pitzu de s\'impreu de s\'aplicatzione</string>
@ -2710,4 +2710,9 @@ Pro praghere iscrie su còdighe intreu</string>
<string name="rendering_value_translucent_pink_name">Rosa translùtzidu</string>
<string name="average">Mèdiu</string>
<string name="ascent_descent">Ascendente/Discendente</string>
<string name="quick_action_resume_pause_navigation">Faghe sighire/Pone in pàusa su nàvigu</string>
<string name="quick_action_resume_pause_navigation_descr">Incarca custu butone pro pònnere in pàusa su nàvigu, o pru lu sighire si est giai in pàusa.</string>
<string name="quick_action_show_navigation_finish_dialog">Ammustra sa ventana pro sa fine de su nàvigu</string>
<string name="quick_action_start_stop_navigation">Incumintza/Acaba su nàvigu</string>
<string name="quick_action_start_stop_navigation_descr">Incarca custu butone pro incumintzare su nàvigu, o pro l\'acabare si est giai incumintzadu.</string>
</resources>

View file

@ -2667,8 +2667,8 @@
<string name="fonts_header">Шрифти для мапи</string>
<string name="right_side_navigation">Правосторонній рух</string>
<string name="routing_attr_driving_style_balance_name">Збалансований</string>
<string name="routing_attr_driving_style_safety_name">Безпечний</string>
<string name="routing_attr_driving_style_speed_name">Швидкісний</string>
<string name="routing_attr_driving_style_safety_name">Надавати перевагу путівцям</string>
<string name="routing_attr_driving_style_speed_name">Враховувати основні дороги</string>
<string name="animate_my_location">Анімувати моє місце розташування</string>
<string name="animate_my_location_desc">Задіяти анімацію мого місця розташування під час навігації</string>
<string name="do_not_show_startup_messages">Не показувати повідомлення при запуску</string>
@ -2944,4 +2944,9 @@
\n
\n</string>
<string name="rendering_value_translucent_pink_name">Напівпрозорий рожевий</string>
<string name="quick_action_resume_pause_navigation">Відновити/призупинити навігацію</string>
<string name="quick_action_resume_pause_navigation_descr">Натисніть цю кнопку, щоб призупинити навігацію або відновити її, якщо вона вже була призупинена.</string>
<string name="quick_action_show_navigation_finish_dialog">Показати вікно, щоб завершити навігацію</string>
<string name="quick_action_start_stop_navigation">Початок/завершення навігації</string>
<string name="quick_action_start_stop_navigation_descr">Натисніть цю кнопку, щоб запустити навігацію або зупинити її, якщо вона вже була запущена.</string>
</resources>

View file

@ -2643,9 +2643,9 @@ OsmAnd (Automated Navigation Directions) 是一個地圖和導航的應用程式
<string name="routing_attr_relief_smoothness_factor_hills_name">丘陵</string>
<string name="routing_attr_relief_smoothness_factor_plains_name">小的丘陵</string>
<string name="routing_attr_relief_smoothness_factor_more_plains_name">平地</string>
<string name="routing_attr_driving_style_speed_name">速度</string>
<string name="routing_attr_driving_style_speed_name">較喜歡的主要道路</string>
<string name="routing_attr_driving_style_balance_name">均衡</string>
<string name="routing_attr_driving_style_safety_name">安全性</string>
<string name="routing_attr_driving_style_safety_name">較喜歡小路</string>
<string name="relief_smoothness_factor_descr">偏愛的地形:平地或丘陵</string>
<string name="full_version_thanks">感謝您購買完整版的 OsmAnd</string>
<string name="routing_attr_relief_smoothness_factor_name">選擇高度起伏</string>

View file

@ -1,5 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="acceptable_touch_radius">48dp</dimen>
<dimen name="dialog_button_height">36dp</dimen>
<dimen name="undo_bottom_offset">15dp</dimen>
<dimen name="touch_slop">32dp</dimen>

View file

@ -119,7 +119,7 @@
<string name="routing_attr_relief_smoothness_factor_hills_name">Hilly</string>
<string name="routing_attr_relief_smoothness_factor_plains_name">Less hilly</string>
<string name="routing_attr_relief_smoothness_factor_more_plains_name">Flat</string>
<string name="routing_attr_driving_style_speed_name">Prefer major roads</string>
<string name="routing_attr_driving_style_speed_name">Accept major roads</string>
<string name="routing_attr_driving_style_balance_name">Balanced</string>
<string name="routing_attr_driving_style_safety_name">Prefer byways</string>
<string name="relief_smoothness_factor_descr">Preferred terrain: flat or hilly</string>

View file

@ -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);

View file

@ -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);

View file

@ -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<TrkSegment> processedRoutePointsToDisplay = gpxFile.processRoutePoints();
if (!processedRoutePointsToDisplay.isEmpty()) {
this.processedPointsToDisplay.addAll(processedRoutePointsToDisplay);
routePoints = !processedRoutePointsToDisplay.isEmpty();
}
}

View file

@ -752,7 +752,7 @@ public class OsmandSettings {
public final OsmandPreference<DrivingRegion> DRIVING_REGION = new EnumIntPreference<DrivingRegion>(
"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<Boolean> 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<MetricsConstants> METRIC_SYSTEM = new EnumIntPreference<MetricsConstants>(

View file

@ -1106,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;
}

View file

@ -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();
}

View file

@ -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()) {

View file

@ -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;
}

View file

@ -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);

View file

@ -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() {

View file

@ -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<WorldRegion, List<IndexItem> > groupByRegion = new LinkedHashMap<WorldRegion, List<IndexItem>>();
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);
}

View file

@ -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);

View file

@ -162,7 +162,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) {

View file

@ -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,18 +278,21 @@ 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);
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, generalDisplayItem.name),
new PointDescription(PointDescription.POINT_TYPE_WPT, getGpxDataItem().getFile().getName()),
false,
getRect()
);
MapActivity.launchMapActivityMoveToTop(getActivity());
}
}
});
final View splitColorView = headerView.findViewById(R.id.split_color_view);
final View divider = headerView.findViewById(R.id.divider);
@ -489,6 +491,7 @@ public class TrackSegmentFragment extends OsmAndListFragment {
}
public void updateSplitView() {
if (getGpx() != null) {
SelectedGpxFile sf = app.getSelectedGpxHelper().selectGpxFile(getGpx(), ((SwitchCompat)headerView.findViewById(R.id.showOnMapToggle)).isChecked(), false);
final List<GpxDisplayGroup> groups = getDisplayGroups();
if (groups.size() > 0) {
@ -499,6 +502,7 @@ public class TrackSegmentFragment extends OsmAndListFragment {
}
updateSplitIntervalView(headerView.findViewById(R.id.split_interval_view));
}
}
private void refreshTrackBitmap() {
currentTrackColor = app.getSettings().CURRENT_TRACK_COLOR.get();
@ -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) {

View file

@ -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);
}
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()), "", false,
commitNode(action, node, mOpenstreetmapUtil.getEntityInfo(node.getId()), comment, false,
new CallbackWithObject<Node>() {
@Override

View file

@ -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<String, PoiType> allTranslatedSubTypes = getMyApplication().getPoiTypes().getAllTranslatedNames(true);
Map<String, Integer> addGroup = new HashMap<>();
Map<String, Integer> editGroup = new HashMap<>();
Map<String, Integer> deleteGroup = new HashMap<>();
Map<String, Integer> 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<String, Integer> 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<String, Integer> 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);
}

View file

@ -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<PoiUIFilter> getTopDefinedPoiFilters() {
if (cacheTopStandardFilters == null) {
// if (cacheTopStandardFilters == null) {
List<PoiUIFilter> top = new ArrayList<PoiUIFilter>();
// user defined
top.addAll(getUserDefinedPoiFilters());
@ -213,7 +209,7 @@ public class PoiFiltersHelper {
}
Collections.sort(top);
cacheTopStandardFilters = top;
}
// }
List<PoiUIFilter> result = new ArrayList<PoiUIFilter>();
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);

View file

@ -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;
@ -573,10 +572,20 @@ public class PoiUIFilter implements SearchPoiTypeFilter, Comparable<PoiUIFilter>
}
public void combineWithPoiFilter(PoiUIFilter f) {
acceptedTypes.putAll(f.acceptedTypes);
putAllAcceptedTypes(f.acceptedTypes);
poiAdditionals.putAll(f.poiAdditionals);
}
private void putAllAcceptedTypes(Map<PoiCategory, LinkedHashSet<String>> 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<PoiUIFilter> filters) {
for (PoiUIFilter f : filters) {
combineWithPoiFilter(f);

View file

@ -48,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;
@ -62,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();
@ -69,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;
@ -104,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);
@ -593,13 +602,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;

View file

@ -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,7 +29,8 @@ import gnu.trove.list.array.TIntArrayList;
public class RulerControlLayer extends OsmandMapLayer {
public static final long DELAY = 2000;
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;
@ -43,6 +45,8 @@ public class RulerControlLayer extends OsmandMapLayer {
private double roundedDist;
private boolean showTwoFingersDistance;
private boolean showDistBetweenFingerAndLocation;
private boolean touchOutside;
private int acceptableTouchRadius;
private QuadPoint cacheCenter;
private int cacheIntZoom;
@ -53,7 +57,10 @@ public class RulerControlLayer extends OsmandMapLayer {
private Path distancePath;
private TIntArrayList tx;
private TIntArrayList ty;
private LatLon singleTouchPointLatLon;
private LatLon touchPointLatLon;
private PointF touchPoint;
private PointF firstTouchPoint;
private long touchTime;
private Bitmap centerIconDay;
private Bitmap centerIconNight;
@ -76,8 +83,8 @@ public class RulerControlLayer extends OsmandMapLayer {
return showDistBetweenFingerAndLocation;
}
public LatLon getSingleTouchPointLatLon() {
return singleTouchPointLatLon;
public LatLon getTouchPointLatLon() {
return touchPointLatLon;
}
@Override
@ -91,6 +98,9 @@ public class RulerControlLayer extends OsmandMapLayer {
distancePath = new Path();
tx = new TIntArrayList();
ty = new TIntArrayList();
firstTouchPoint = new PointF();
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);
@ -131,15 +141,32 @@ public class RulerControlLayer extends OsmandMapLayer {
@Override
public boolean onTouchEvent(MotionEvent event, RotatedTileBox tileBox) {
if (rulerModeOn()) {
if (event.getAction() == MotionEvent.ACTION_DOWN) {
showDistBetweenFingerAndLocation = true;
singleTouchPointLatLon = tileBox.getLatLonFromPixel(event.getX(), event.getY());
touchOutside = false;
firstTouchPoint.set(event.getX(), event.getY());
setSingleTouch(event.getX(), event.getY(), tileBox);
} else if (event.getAction() == MotionEvent.ACTION_MOVE) {
double d = Math.sqrt(Math.pow(event.getX() - firstTouchPoint.x, 2) + Math.pow(event.getY() - firstTouchPoint.y, 2));
if (d < acceptableTouchRadius) {
setSingleTouch(event.getX(), event.getY(), tileBox);
touchOutside = false;
} else {
touchOutside = true;
}
} else if (event.getAction() == MotionEvent.ACTION_UP) {
showDistBetweenFingerAndLocation = false;
refreshMapDelayed();
}
}
return false;
}
private void setSingleTouch(float x, float y, RotatedTileBox tb) {
touchTime = System.currentTimeMillis();
touchPoint.set(x, y);
touchPointLatLon = tb.getLatLonFromPixel(x, y);
}
@Override
public void onDraw(Canvas canvas, RotatedTileBox tb, DrawSettings settings) {
if (rulerModeOn()) {
@ -151,20 +178,22 @@ public class RulerControlLayer extends OsmandMapLayer {
final QuadPoint center = tb.getCenterPixelPoint();
final RulerMode mode = app.getSettings().RULER_MODE.get();
if (view.isMultiTouch()) {
showDistBetweenFingerAndLocation = false;
} else if (cacheMultiTouchEndTime != view.getMultiTouchEndTime()) {
if (cacheMultiTouchEndTime != view.getMultiTouchEndTime()) {
cacheMultiTouchEndTime = view.getMultiTouchEndTime();
refreshMapDelayed();
}
showTwoFingersDistance = !view.isWasZoomInMultiTouch() && !tb.isZoomAnimated() &&
(view.isMultiTouch() || System.currentTimeMillis() - cacheMultiTouchEndTime < DELAY);
boolean wasNotZoom = !view.isWasZoomInMultiTouch() && !tb.isZoomAnimated();
showTwoFingersDistance = wasNotZoom &&
(view.isMultiTouch() || System.currentTimeMillis() - cacheMultiTouchEndTime < DRAW_TIME);
showDistBetweenFingerAndLocation = !showTwoFingersDistance && wasNotZoom && !view.isMultiTouch() &&
!touchOutside && System.currentTimeMillis() - touchTime > DELAY_BEFORE_DRAW &&
System.currentTimeMillis() - touchTime < DRAW_TIME;
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());
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();
@ -195,8 +224,8 @@ public class RulerControlLayer extends OsmandMapLayer {
rightWidgetsPanel.getVisibility() == View.VISIBLE;
}
public void refreshMapDelayed() {
handler.sendEmptyMessageDelayed(0, DELAY + 50);
private void refreshMapDelayed() {
handler.sendEmptyMessageDelayed(0, DRAW_TIME + 50);
}
private void drawFingerDistance(Canvas canvas, float x1, float y1, float x2, float y2, boolean nightMode) {

View file

@ -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;