Merge
This commit is contained in:
commit
7b031e444e
36 changed files with 920 additions and 682 deletions
|
@ -1960,4 +1960,6 @@ OsmAnd мае адкрыты зыходны код і актыўна разві
|
||||||
<string name="show_all">ПАКАЗАЦЬ УСЁ</string>
|
<string name="show_all">ПАКАЗАЦЬ УСЁ</string>
|
||||||
<string name="coordinates">Каардынаты</string>
|
<string name="coordinates">Каардынаты</string>
|
||||||
<string name="error_avoid_specific_road">Бліжэйшая дарога не была знойдзена</string>
|
<string name="error_avoid_specific_road">Бліжэйшая дарога не была знойдзена</string>
|
||||||
|
<string name="use_opengl_render">Выкарыстоўваць OpenGL</string>
|
||||||
|
<string name="use_opengl_render_descr">Выкарыстоўваць апаратнае паскарэньне OpenGL (можа не працаваць на некаторых прыстасаваньнях)</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -1902,4 +1902,6 @@ La llista de països inclosos (bàsicament tot el món!): Afganistan, Albània,
|
||||||
<string name="coordinates">Coordenades</string>
|
<string name="coordinates">Coordenades</string>
|
||||||
<string name="map_update">Mapes</string>
|
<string name="map_update">Mapes</string>
|
||||||
<string name="error_avoid_specific_road">No s\'ha trobat cap ruta a prop</string>
|
<string name="error_avoid_specific_road">No s\'ha trobat cap ruta a prop</string>
|
||||||
|
<string name="use_opengl_render">Ús de renderització OpenGL</string>
|
||||||
|
<string name="use_opengl_render_descr">Ús de renderitació OpenGL per accelerador gràfic (no funciona a tots els dispositius)</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -66,7 +66,7 @@
|
||||||
<string name="poi_optician_shop">Optiker</string>
|
<string name="poi_optician_shop">Optiker</string>
|
||||||
<string name="poi_organic_shop">Økologiske fødevarer</string>
|
<string name="poi_organic_shop">Økologiske fødevarer</string>
|
||||||
<string name="poi_outdoor_shop">Fritidsbeklædning</string>
|
<string name="poi_outdoor_shop">Fritidsbeklædning</string>
|
||||||
<string name="poi_paint_shop">Maling</string>
|
<string name="poi_paint_shop">Malerværksted</string>
|
||||||
<string name="poi_pet_shop">Dyrehandel</string>
|
<string name="poi_pet_shop">Dyrehandel</string>
|
||||||
<string name="poi_radiotechnics_shop">Radiodele</string>
|
<string name="poi_radiotechnics_shop">Radiodele</string>
|
||||||
<string name="poi_second_hand">Genbrugsbutik</string>
|
<string name="poi_second_hand">Genbrugsbutik</string>
|
||||||
|
|
|
@ -1851,4 +1851,6 @@
|
||||||
<string name="coordinates">Koordinater</string>
|
<string name="coordinates">Koordinater</string>
|
||||||
<string name="map_update">Kort</string>
|
<string name="map_update">Kort</string>
|
||||||
<string name="error_avoid_specific_road">Nærmeste vej blev ikke fundet</string>
|
<string name="error_avoid_specific_road">Nærmeste vej blev ikke fundet</string>
|
||||||
|
<string name="use_opengl_render">Brug OpenGL optegning</string>
|
||||||
|
<string name="use_opengl_render_descr">Brug hardware accelereret OpenGL optegning (virker muligvis ikke på alle enheder)</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?xml version="1.0" encoding="utf-8" ?>
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
<resources>
|
<resources>
|
||||||
<string name="traffic_warning_speed_limit">Geschwindigkeitsbegrenzung</string>
|
<string name="traffic_warning_speed_limit">Geschwindigkeitsbegrenzung</string>
|
||||||
<string name="traffic_warning_border_control">Grenzkontrolle</string>
|
<string name="traffic_warning_border_control">Grenzkontrolle</string>
|
||||||
|
@ -1950,7 +1950,7 @@ Afghanistan, Ägypten, Albanien, Algerien, Andorra, Angola, Anguilla, Antigua an
|
||||||
<string name="gpx_option_reverse_route">GPX-Route umkehren</string>
|
<string name="gpx_option_reverse_route">GPX-Route umkehren</string>
|
||||||
<string name="gpx_option_destination_point">Derzeitiges Ziel verwenden</string>
|
<string name="gpx_option_destination_point">Derzeitiges Ziel verwenden</string>
|
||||||
<string name="gpx_option_from_start_point">Gesamten Track durchlaufen</string>
|
<string name="gpx_option_from_start_point">Gesamten Track durchlaufen</string>
|
||||||
<string name="gpx_files_not_found">Keine GPX-Dateien gefunden in /tracks-Ordner</string>
|
<string name="gpx_files_not_found">Keine GPX-Dateien gefunden im /tracks-Ordner</string>
|
||||||
<string name="gpx_file_name">GPX-Dateiname</string>
|
<string name="gpx_file_name">GPX-Dateiname</string>
|
||||||
<string name="gpx_saved_sucessfully">GPX-Datei erfolgreich gespeichert unter {0}</string>
|
<string name="gpx_saved_sucessfully">GPX-Datei erfolgreich gespeichert unter {0}</string>
|
||||||
<string name="gpx_option_calculate_first_last_segment">Berechnen des ersten und letzten Abschnitts der OsmAnd-Route</string>
|
<string name="gpx_option_calculate_first_last_segment">Berechnen des ersten und letzten Abschnitts der OsmAnd-Route</string>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
<resources>
|
<resources>
|
||||||
|
|
||||||
<string name="layer_map_appearance">Configura pantalla</string>
|
<string name="layer_map_appearance">Configura pantalla</string>
|
||||||
|
@ -1884,4 +1884,7 @@ Afganistán, Albania, Alemania, Andorra, Angola, Anguila, Antigua y Barbuda, Ant
|
||||||
<string name="show_map">MOSTRAR MAPA</string>
|
<string name="show_map">MOSTRAR MAPA</string>
|
||||||
<string name="show_all">MOSTRAR TODO</string>
|
<string name="show_all">MOSTRAR TODO</string>
|
||||||
<string name="coordinates">Coordenadas</string>
|
<string name="coordinates">Coordenadas</string>
|
||||||
|
<string name="use_opengl_render">Usar renderizado opengl</string>
|
||||||
|
<string name="use_opengl_render_descr">Usar renderizado opengl acelerado por hardware (podría no funcionar en algunos dispositivos)</string>
|
||||||
|
<string name="error_avoid_specific_road">No se ha encontrado la carretera más cercana</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -1867,4 +1867,6 @@ Afghanistan, Albanie, Algérie, Allemagne, Andorre, Angola, Anguilla, Antigua-et
|
||||||
<string name="coordinates">Coordonnées</string>
|
<string name="coordinates">Coordonnées</string>
|
||||||
<string name="map_update">Cartes</string>
|
<string name="map_update">Cartes</string>
|
||||||
<string name="error_avoid_specific_road">Aucune route n\'a été trouvée à proximité</string>
|
<string name="error_avoid_specific_road">Aucune route n\'a été trouvée à proximité</string>
|
||||||
|
<string name="use_opengl_render">Utiliser le rendu OpenGL</string>
|
||||||
|
<string name="use_opengl_render_descr">Utiliser le rendu matériel accéléré OpenGL (cette option peut être inefficace sur certains appareils)</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
235
OsmAnd/res/values-hu/phrases.xml
Normal file
235
OsmAnd/res/values-hu/phrases.xml
Normal file
|
@ -0,0 +1,235 @@
|
||||||
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
|
<resources><string name="poi_palaeontological_site">Régészeti lelőhely</string>
|
||||||
|
|
||||||
|
<string name="poi_bakery">Pékség</string>
|
||||||
|
<string name="poi_convenience">Kisbolt</string>
|
||||||
|
<string name="poi_mall">Bevásárlóközpont</string>
|
||||||
|
<string name="poi_beverages">Italbolt</string>
|
||||||
|
<string name="poi_butcher">Hentes</string>
|
||||||
|
<string name="poi_deli">Delikatesz bolt</string>
|
||||||
|
<string name="poi_shop_farm">Farm bolt</string>
|
||||||
|
<string name="poi_greengrocer">Zöldséges</string>
|
||||||
|
<string name="poi_seafood">Halárus</string>
|
||||||
|
<string name="poi_confectionery">Cukrászda</string>
|
||||||
|
<string name="poi_ice_cream">Fagyizó</string>
|
||||||
|
<string name="poi_supermarket">Szupermarket</string>
|
||||||
|
<string name="poi_shop_tea">Teabolt</string>
|
||||||
|
<string name="poi_dairy">Tejtermék bolt</string>
|
||||||
|
<string name="poi_vending_machine">Árusító automata</string>
|
||||||
|
|
||||||
|
<string name="poi_bookshop">Könyvesbolt</string>
|
||||||
|
<string name="poi_bicycle_shop">Kerékpárbolt</string>
|
||||||
|
<string name="poi_anime_shop">Anime bolt</string>
|
||||||
|
<string name="poi_antiques_shop">Antikvárius</string>
|
||||||
|
<string name="poi_chemist_shop">Drogéria</string>
|
||||||
|
<string name="poi_copyshop">Fénymásoló</string>
|
||||||
|
<string name="poi_florist">Virágárus</string>
|
||||||
|
<string name="poi_garden_centre">Kertészet</string>
|
||||||
|
<string name="poi_gift_shop">Ajándékbolt</string>
|
||||||
|
<string name="poi_hardware_shop">Háztartási bolt</string>
|
||||||
|
<string name="poi_jewelry_shop">Ékszerbolt</string>
|
||||||
|
<string name="poi_motorcycle_shop">Motorkerékpár kereskedés</string>
|
||||||
|
<string name="poi_sports_shop">Sportbolt</string>
|
||||||
|
<string name="poi_ticket_shop">Jegyárus</string>
|
||||||
|
<string name="poi_tobacco_shop">Dohánybolt</string>
|
||||||
|
<string name="poi_toys_shop">Játékbolt</string>
|
||||||
|
<string name="poi_variety_store">100 forintos bolt</string>
|
||||||
|
<string name="poi_department_store">Áruház</string>
|
||||||
|
<string name="poi_car_shop">Autókereskedés</string>
|
||||||
|
<string name="poi_car_parts_shop">Autóalkatrész</string>
|
||||||
|
<string name="poi_marketplace">Piac</string>
|
||||||
|
<string name="poi_police">Rendőrség</string>
|
||||||
|
<string name="poi_fire_station">Tűzoltóság</string>
|
||||||
|
<string name="poi_emergency_phone">Segélykérő telefon</string>
|
||||||
|
<string name="poi_fire_hydrant">Tűzcsap</string>
|
||||||
|
<string name="poi_ambulance_station">Mentőállomás</string>
|
||||||
|
<string name="poi_ford">Gázló</string>
|
||||||
|
<string name="poi_mountain_pass">Hágó</string>
|
||||||
|
<string name="poi_gate">Kapu</string>
|
||||||
|
<string name="poi_city_wall">Városfal</string>
|
||||||
|
<string name="poi_lift_gate">Sorompó</string>
|
||||||
|
<string name="poi_toll_booth">Fizetőkapu</string>
|
||||||
|
<string name="poi_border_control">Határellenőrzés</string>
|
||||||
|
<string name="poi_traffic_signals">Villanyrendőr</string>
|
||||||
|
|
||||||
|
<string name="poi_car_repair">Autószerviz</string>
|
||||||
|
<string name="poi_service_tyres">Autógumis</string>
|
||||||
|
<string name="poi_car_wash">Autómosó</string>
|
||||||
|
<string name="poi_fuel">Benzinkút</string>
|
||||||
|
<string name="poi_charging_station">Elektromos töltőállomás</string>
|
||||||
|
<string name="poi_compressed_air">Sűrített levegő</string>
|
||||||
|
<string name="poi_parking">Parkoló</string>
|
||||||
|
<string name="poi_motorcycle_parking">Motor parkoló</string>
|
||||||
|
<string name="poi_parking_entrance">Parkolóház bejárat</string>
|
||||||
|
<string name="poi_garages">Garázsok</string>
|
||||||
|
|
||||||
|
<string name="poi_public_transport_platform">Tömegközlekedési megálló</string>
|
||||||
|
<string name="poi_public_transport_platform_bus">Buszmegálló</string>
|
||||||
|
<string name="poi_public_transport_platform_trolleybus">Trolimegálló</string>
|
||||||
|
<string name="poi_public_transport_platform_tram">Villamosmegálló</string>
|
||||||
|
<string name="poi_subway_entrance">Metró lejárat</string>
|
||||||
|
<string name="poi_subway_station">Metrómegálló</string>
|
||||||
|
<string name="poi_taxi">Taxidroszt</string>
|
||||||
|
|
||||||
|
<string name="poi_airport">Repülőtér</string>
|
||||||
|
<string name="poi_runway">Kifutópálya</string>
|
||||||
|
<string name="poi_aeroway_terminal">Utasterminál</string>
|
||||||
|
<string name="poi_aeroway_gate">Reptér kapu</string>
|
||||||
|
|
||||||
|
<string name="poi_slipway">Sólya</string>
|
||||||
|
<string name="poi_ferry_terminal">Kompkikötő</string>
|
||||||
|
<string name="poi_lighthouse">Világítótorony</string>
|
||||||
|
|
||||||
|
<string name="poi_bicycle_rental">Kerékpárkölcsönző</string>
|
||||||
|
<string name="poi_bicycle_parking">Kerékpárparkoló</string>
|
||||||
|
|
||||||
|
<string name="poi_tunnel">Alagút</string>
|
||||||
|
<string name="poi_bridge">Híd</string>
|
||||||
|
|
||||||
|
<string name="poi_speed_camera">Traffipax</string>
|
||||||
|
<string name="poi_motorway_junction">Autópálya csomópont</string>
|
||||||
|
|
||||||
|
<string name="poi_water_tower">Víztorony</string>
|
||||||
|
<string name="poi_post_office">Posta</string>
|
||||||
|
<string name="poi_post_box">Postaláda</string>
|
||||||
|
<string name="poi_telephone">Telefon</string>
|
||||||
|
<string name="poi_communication_tower">Távközlési torony</string>
|
||||||
|
<string name="poi_recycling">Hulladékgyűjtő</string>
|
||||||
|
<string name="poi_landfill">Szeméttelep</string>
|
||||||
|
<string name="poi_pier">Móló</string>
|
||||||
|
<string name="poi_windmill">Szélmalom</string>
|
||||||
|
<string name="poi_quarry">Kőfejtő</string>
|
||||||
|
<string name="poi_vineyard">Szőlős</string>
|
||||||
|
<string name="poi_orchard">Gyümölcsös</string>
|
||||||
|
<string name="poi_salt_pond">Sólepárló</string>
|
||||||
|
<string name="poi_school">Iskola</string>
|
||||||
|
<string name="poi_kindergarten">Óvoda</string>
|
||||||
|
<string name="poi_university">Egyetem</string>
|
||||||
|
|
||||||
|
<string name="poi_courthouse">Bíróság</string>
|
||||||
|
<string name="poi_prison">Börtön</string>
|
||||||
|
<string name="poi_embassy">Nagykövetség</string>
|
||||||
|
<string name="poi_city">Nagyváros</string>
|
||||||
|
<string name="poi_town">Város</string>
|
||||||
|
<string name="poi_village">Falu</string>
|
||||||
|
<string name="poi_hamlet">Falucska</string>
|
||||||
|
<string name="poi_locality">Lakatlan hely</string>
|
||||||
|
|
||||||
|
<string name="poi_pharmacy">Gyógyszertár</string>
|
||||||
|
<string name="poi_hospital">Kórház</string>
|
||||||
|
<string name="poi_doctors">Orvos</string>
|
||||||
|
<string name="poi_clinic">Klinika</string>
|
||||||
|
<string name="poi_dentist">Fogorvos</string>
|
||||||
|
<string name="poi_veterinary">Állatorvos</string>
|
||||||
|
<string name="poi_sanatorium">Szanatórium</string>
|
||||||
|
<string name="poi_town_hall">Városháza</string>
|
||||||
|
<string name="poi_stadium">Stadion</string>
|
||||||
|
<string name="poi_sports_centre">Sportközpont</string>
|
||||||
|
<string name="poi_golf_course">Golfpálya</string>
|
||||||
|
<string name="poi_ice_rink">Műjégpálya</string>
|
||||||
|
<string name="poi_pitch">Pálya</string>
|
||||||
|
<string name="poi_raceway">Versenypálya</string>
|
||||||
|
<string name="poi_museum">Múzeum</string>
|
||||||
|
<string name="poi_attraction">Turistalátványosság</string>
|
||||||
|
<string name="poi_memorial">Emlékmű</string>
|
||||||
|
<string name="poi_artwork">Műalkotás</string>
|
||||||
|
<string name="poi_castle">Kastély</string>
|
||||||
|
<string name="poi_city_gate">Városkapu</string>
|
||||||
|
<string name="poi_fort">Erőd</string>
|
||||||
|
<string name="poi_fountain">Szökőkút</string>
|
||||||
|
<string name="poi_ruins_historic">Romok</string>
|
||||||
|
<string name="poi_monument">Műemlék</string>
|
||||||
|
<string name="poi_zoo">Állatkert</string>
|
||||||
|
<string name="poi_theme_park">Vidámpark</string>
|
||||||
|
|
||||||
|
<string name="poi_hotel">Hotel</string>
|
||||||
|
<string name="poi_guest_house">Vendégház</string>
|
||||||
|
<string name="poi_motel">Motel</string>
|
||||||
|
<string name="poi_alpine_hut">Menedékház</string>
|
||||||
|
<string name="poi_place_of_worship">Istentiszteleti hely</string>
|
||||||
|
<string name="poi_place_of_worship_christian">Istentiszteleti hely: keresztény</string>
|
||||||
|
<string name="poi_place_of_worship_jewish">Istentiszteleti hely: zsidó</string>
|
||||||
|
<string name="poi_place_of_worship_muslim">Istentiszteleti hely: muszlim</string>
|
||||||
|
<string name="poi_place_of_worship_sikh">Istentiszteleti hely: szikh</string>
|
||||||
|
<string name="poi_place_of_worship_buddhist">Istentiszteleti hely: buddhista</string>
|
||||||
|
<string name="poi_place_of_worship_hindu">Istentiszteleti hely: hindu</string>
|
||||||
|
<string name="poi_place_of_worship_shinto">Istentiszteleti hely: sintoista</string>
|
||||||
|
<string name="poi_place_of_worship_taoist">Istentiszteleti hely: taoista</string>
|
||||||
|
<string name="poi_monastery">Kolostor</string>
|
||||||
|
<string name="poi_wayside_cross">Útmenti kereszt</string>
|
||||||
|
<string name="poi_tourism_information">Turistainformáció</string>
|
||||||
|
<string name="poi_clock">Óra</string>
|
||||||
|
<string name="poi_viewpoint">Kilátóhely</string>
|
||||||
|
<string name="poi_camp_site">Kemping</string>
|
||||||
|
<string name="poi_caravan_site">Lakóautó hely</string>
|
||||||
|
<string name="poi_picnic_site">Piknikezőhely</string>
|
||||||
|
<string name="poi_spring">Forrás</string>
|
||||||
|
<string name="poi_hot_spring">Hőforrás</string>
|
||||||
|
<string name="poi_geyser">Gejzír</string>
|
||||||
|
<string name="poi_cemetery">Temető</string>
|
||||||
|
<string name="poi_grave_yard">Sírkert</string>
|
||||||
|
<string name="poi_shelter">Menedék</string>
|
||||||
|
<string name="poi_funicular">Sikló</string>
|
||||||
|
<string name="poi_library">Könyvtár</string>
|
||||||
|
<string name="poi_cinema">Mozi</string>
|
||||||
|
<string name="poi_casino">Kaszinó</string>
|
||||||
|
<string name="poi_community_centre">Közösségi ház</string>
|
||||||
|
<string name="poi_theatre">Színház</string>
|
||||||
|
<string name="poi_circus">Cirkusz</string>
|
||||||
|
<string name="poi_beach_resort">Strand</string>
|
||||||
|
<string name="poi_hunting_stand">Vadászles</string>
|
||||||
|
<string name="poi_marina">Kishajókikötő</string>
|
||||||
|
<string name="poi_miniature_golf">Minigolf</string>
|
||||||
|
<string name="poi_playground">Játszótér</string>
|
||||||
|
<string name="poi_swimming_pool">Úszómedence</string>
|
||||||
|
<string name="poi_park">Park</string>
|
||||||
|
|
||||||
|
<string name="poi_cafe">Kávézó</string>
|
||||||
|
<string name="poi_biergarten">Sörkert</string>
|
||||||
|
<string name="poi_restaurant">Étterem</string>
|
||||||
|
<string name="poi_fast_food">Gyorsétterem</string>
|
||||||
|
<string name="poi_bar">Bár</string>
|
||||||
|
<string name="poi_pub">Kocsma</string>
|
||||||
|
<string name="poi_drinking_water">Ivóvíz</string>
|
||||||
|
<string name="poi_beekeeper">Méhész</string>
|
||||||
|
<string name="poi_blacksmith">Patkolókovács</string>
|
||||||
|
<string name="poi_brewery">Sörfőzde</string>
|
||||||
|
<string name="poi_bookbinder">Könyvkötő</string>
|
||||||
|
<string name="poi_carpenter">Asztalos</string>
|
||||||
|
<string name="poi_clockmaker">Órás</string>
|
||||||
|
<string name="poi_dressmaker">Ruhakészítő</string>
|
||||||
|
<string name="poi_electrician">Villanyszerelő</string>
|
||||||
|
<string name="poi_gardener">Kertész</string>
|
||||||
|
<string name="poi_jeweller">Ékszerész</string>
|
||||||
|
<string name="poi_locksmith">Zárjavító</string>
|
||||||
|
<string name="poi_key_cutter">Kulcsmásoló</string>
|
||||||
|
<string name="poi_photographer">Fotográfus</string>
|
||||||
|
<string name="poi_photographic_laboratory">Fotólabor</string>
|
||||||
|
<string name="poi_plumber">Vízvezeték szerelő</string>
|
||||||
|
<string name="poi_roofer">Tetőfedő</string>
|
||||||
|
<string name="poi_shoemaker">Cipész</string>
|
||||||
|
<string name="poi_hairdresser">Fodrász</string>
|
||||||
|
<string name="poi_car_rental">Autókölcsönző</string>
|
||||||
|
<string name="poi_bank">Bank</string>
|
||||||
|
<string name="poi_atm">Bankautomata</string>
|
||||||
|
<string name="poi_currencyexchange">Pénzváltó</string>
|
||||||
|
<string name="poi_accountant">Könyvelő</string>
|
||||||
|
<string name="poi_cave_entrance">Barlangbejárat</string>
|
||||||
|
<string name="poi_peak">Hegycsúcs</string>
|
||||||
|
<string name="poi_saddle">Nyereg</string>
|
||||||
|
<string name="poi_volcano">Vulkán</string>
|
||||||
|
<string name="poi_crater">Kráter</string>
|
||||||
|
<string name="poi_ridge">Gerinc</string>
|
||||||
|
<string name="poi_glacier">Gleccser</string>
|
||||||
|
<string name="poi_sinkhole">Víznyelő</string>
|
||||||
|
<string name="poi_waterfall">Vízesés</string>
|
||||||
|
<string name="poi_river">Folyó</string>
|
||||||
|
<string name="poi_stream">Patak</string>
|
||||||
|
<string name="poi_beach">Strand</string>
|
||||||
|
<string name="poi_bay">Öböl</string>
|
||||||
|
<string name="poi_fjord">Fjord</string>
|
||||||
|
<string name="poi_reef">Zátony</string>
|
||||||
|
<string name="poi_wetland">Láp</string>
|
||||||
|
<string name="poi_nature_reserve">Természetvédelmi terület</string>
|
||||||
|
<string name="poi_island">Sziget</string>
|
||||||
|
</resources>
|
File diff suppressed because one or more lines are too long
|
@ -2034,4 +2034,6 @@ Si consiglia di aggiungere uno o più punti intermedi per migliorarne le prestaz
|
||||||
<string name="search_for">Cerca</string>
|
<string name="search_for">Cerca</string>
|
||||||
<string name="show_map">MOSTRA LA MAPPA</string>
|
<string name="show_map">MOSTRA LA MAPPA</string>
|
||||||
<string name="error_avoid_specific_road">Non è stata trovata una strada nelle vicinanze</string>
|
<string name="error_avoid_specific_road">Non è stata trovata una strada nelle vicinanze</string>
|
||||||
|
<string name="use_opengl_render">Utilizzare il rendering opengl</string>
|
||||||
|
<string name="use_opengl_render_descr">Utilizzare il rendering opengl accelerato via hardware (potrebbe non funzionare in alcuni dispositivi)</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
2
OsmAnd/res/values-ko/phrases.xml
Normal file
2
OsmAnd/res/values-ko/phrases.xml
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources></resources>
|
|
@ -2090,4 +2090,6 @@
|
||||||
<string name="show_all">모두 표시</string>
|
<string name="show_all">모두 표시</string>
|
||||||
<string name="coordinates">좌표</string>
|
<string name="coordinates">좌표</string>
|
||||||
<string name="error_avoid_specific_road">가장 가까운 도로를 찾을 수 없습니다</string>
|
<string name="error_avoid_specific_road">가장 가까운 도로를 찾을 수 없습니다</string>
|
||||||
|
<string name="use_opengl_render">Opengl 렌더링 사용</string>
|
||||||
|
<string name="use_opengl_render_descr">하드웨어로 가속된 opengl 렌더링 사용 (일부 장치에는 작동 하지 않을 수 있습니다)</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -1851,4 +1851,6 @@
|
||||||
<string name="show_all">RODYTI VISKĄ</string>
|
<string name="show_all">RODYTI VISKĄ</string>
|
||||||
<string name="coordinates">Koordinatės</string>
|
<string name="coordinates">Koordinatės</string>
|
||||||
<string name="error_avoid_specific_road">Nerastas trumpiausias kelias</string>
|
<string name="error_avoid_specific_road">Nerastas trumpiausias kelias</string>
|
||||||
|
<string name="use_opengl_render">Naudoti OpenGL vaizdavimą</string>
|
||||||
|
<string name="use_opengl_render_descr">Naudoti aparatinį OpenGL vaizdavimą (gali neveikti kai kurioje įrangoje)</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
<resources><string name="rendering_attr_roadColors_description">Velg fargeskjema for veier:</string>
|
<resources><string name="rendering_attr_roadColors_description">Velg fargeskjema for veier:</string>
|
||||||
<string name="rendering_attr_roadColors_name">Veifargeskjema</string>
|
<string name="rendering_attr_roadColors_name">Veifargeskjema</string>
|
||||||
<string name="map_widget_show_destination_arrow">Vis retning til målet</string>
|
<string name="map_widget_show_destination_arrow">Vis retning til målet</string>
|
||||||
|
@ -1067,5 +1067,11 @@
|
||||||
<string name="download_files">Last ned</string>
|
<string name="download_files">Last ned</string>
|
||||||
<string name="osmo_use_https_descr">Bruk sikker forbindelse med server</string>
|
<string name="osmo_use_https_descr">Bruk sikker forbindelse med server</string>
|
||||||
<string name="osmo_use_https">Bruk https</string>
|
<string name="osmo_use_https">Bruk https</string>
|
||||||
<string name="application_dir_change_warning2">Skal OsmAnd forsøke å kopiere datafilene til det nye stedet?</string>
|
<string name="application_dir_change_warning2">Skal OsmAnd også kopiere datafilene til det nye stedet?</string>
|
||||||
|
<string name="error_avoid_specific_road">Nærmeste vei ble ikke funnet</string>
|
||||||
|
<string name="home_button">Hjem</string>
|
||||||
|
<string name="map_update">Kart</string>
|
||||||
|
<string name="search_for">Søk etter</string>
|
||||||
|
<string name="show_map">VIS KART</string>
|
||||||
|
<string name="coordinates">Koordinater</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -582,12 +582,12 @@
|
||||||
<string name="poi_seamark_light_float"/>
|
<string name="poi_seamark_light_float"/>
|
||||||
<string name="poi_seamark_light_vessel"/>
|
<string name="poi_seamark_light_vessel"/>
|
||||||
<string name="poi_seamark_mooring">Причал</string>
|
<string name="poi_seamark_mooring">Причал</string>
|
||||||
<string name="poi_seamark_notice"/>
|
<string name="poi_seamark_notice">Уведомление</string>
|
||||||
<string name="poi_seamark_pile"/>
|
<string name="poi_seamark_pile"/>
|
||||||
<string name="poi_seamark_radar_transponder"/>
|
<string name="poi_seamark_radar_transponder"/>
|
||||||
<string name="poi_seamark_radio_station"/>
|
<string name="poi_seamark_radio_station">Радиостанция</string>
|
||||||
<string name="poi_seamark_signal_station_traffic"/>
|
<string name="poi_seamark_signal_station_traffic"/>
|
||||||
<string name="poi_seamark_signal_station_warning"/>
|
<string name="poi_seamark_signal_station_warning">Сигнал опасности</string>
|
||||||
<string name="poi_seamark_small_craft_facility"/>
|
<string name="poi_seamark_small_craft_facility"/>
|
||||||
<string name="poi_seamark_topmark"/>
|
<string name="poi_seamark_topmark"/>
|
||||||
<string name="poi_seamark_rock"/>
|
<string name="poi_seamark_rock"/>
|
||||||
|
@ -601,9 +601,9 @@
|
||||||
<string name="poi_military_naval_base">Военно-морская база</string>
|
<string name="poi_military_naval_base">Военно-морская база</string>
|
||||||
<string name="poi_military_nuclear_explosion_site">Место ядерного взрыва</string>
|
<string name="poi_military_nuclear_explosion_site">Место ядерного взрыва</string>
|
||||||
<string name="poi_city">Город</string>
|
<string name="poi_city">Город</string>
|
||||||
<string name="poi_town">Город</string>
|
<string name="poi_town">Город (небольшой)</string>
|
||||||
<string name="poi_village">Деревня</string>
|
<string name="poi_village">Деревня</string>
|
||||||
<string name="poi_hamlet">Деревня</string>
|
<string name="poi_hamlet">Деревня (небольшая)</string>
|
||||||
<string name="poi_isolated_dwelling">Хутор</string>
|
<string name="poi_isolated_dwelling">Хутор</string>
|
||||||
<string name="poi_locality">Урочище</string>
|
<string name="poi_locality">Урочище</string>
|
||||||
|
|
||||||
|
@ -619,4 +619,5 @@
|
||||||
<string name="poi_astronomical_observatory">Астрономическая обсерватория</string>
|
<string name="poi_astronomical_observatory">Астрономическая обсерватория</string>
|
||||||
<string name="poi_hot_spring">Горячий источник</string>
|
<string name="poi_hot_spring">Горячий источник</string>
|
||||||
<string name="poi_geyser">Гейзер</string>
|
<string name="poi_geyser">Гейзер</string>
|
||||||
|
<string name="poi_leisure_track">Спортивная дорожка</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
<resources>
|
<resources>
|
||||||
<string name="osmo_use_https_descr">Использовать безопасное соединение с сервером</string>
|
<string name="osmo_use_https_descr">Использовать безопасное соединение с сервером</string>
|
||||||
<string name="osmo_use_https">Использовать https</string>
|
<string name="osmo_use_https">Использовать https</string>
|
||||||
|
@ -440,7 +440,7 @@
|
||||||
<string name="amenity_type_emergency">Экстренные службы</string>
|
<string name="amenity_type_emergency">Экстренные службы</string>
|
||||||
<string name="amenity_type_entertainment">Развлечения</string>
|
<string name="amenity_type_entertainment">Развлечения</string>
|
||||||
<string name="amenity_type_finance">Финансы</string>
|
<string name="amenity_type_finance">Финансы</string>
|
||||||
<string name="amenity_type_geocache">Геокэшинг</string>
|
<string name="amenity_type_geocache">Геокэшинг (игра)</string>
|
||||||
<string name="amenity_type_healthcare">Здоровье</string>
|
<string name="amenity_type_healthcare">Здоровье</string>
|
||||||
<string name="amenity_type_historic">Историческое</string>
|
<string name="amenity_type_historic">Историческое</string>
|
||||||
<string name="amenity_type_landuse">Землепользование</string>
|
<string name="amenity_type_landuse">Землепользование</string>
|
||||||
|
@ -1411,7 +1411,7 @@
|
||||||
<string name="routing_attr_weight_description">Укажите массу автомобиля разрешенную на маршрутах</string>
|
<string name="routing_attr_weight_description">Укажите массу автомобиля разрешенную на маршрутах</string>
|
||||||
|
|
||||||
<string name="map_widget_map_rendering">Отображение карты</string>
|
<string name="map_widget_map_rendering">Отображение карты</string>
|
||||||
<string name="amenity_type_seamark">Навигационный знак</string>
|
<string name="amenity_type_seamark">Навигационные знаки (водоемы)</string>
|
||||||
<string name="disable_complex_routing">Отключить сложную маршрутизацию</string>
|
<string name="disable_complex_routing">Отключить сложную маршрутизацию</string>
|
||||||
<string name="speech_rate_descr">Указать скорость произношения для TTS</string>
|
<string name="speech_rate_descr">Указать скорость произношения для TTS</string>
|
||||||
<string name="guidance_preferences_descr">Установки навигации</string>
|
<string name="guidance_preferences_descr">Установки навигации</string>
|
||||||
|
|
|
@ -134,4 +134,193 @@
|
||||||
<string name="poi_bicycle_parking">Parchègiu bitzicletas</string>
|
<string name="poi_bicycle_parking">Parchègiu bitzicletas</string>
|
||||||
|
|
||||||
<string name="poi_aerialway_gondola">Gondola</string>
|
<string name="poi_aerialway_gondola">Gondola</string>
|
||||||
|
<string name="poi_aerialway_station">Istatzione sciovia</string>
|
||||||
|
<string name="poi_aerialway_cable_car">Funivia</string>
|
||||||
|
<string name="poi_aerialway_chair_lift">Ascensore carrotzina</string>
|
||||||
|
<string name="poi_aerialway_t_bar">Sciovia a àncora</string>
|
||||||
|
<string name="poi_aerialway_j_bar">Sciovia a J</string>
|
||||||
|
<string name="poi_aerialway_platter">Sciovia a piatellu</string>
|
||||||
|
<string name="poi_aerialway_mixed_lift">Sciovia ammesturada</string>
|
||||||
|
<string name="poi_aerialway_drag_lift">Sciovia</string>
|
||||||
|
<string name="poi_aerialway_rope_tow">Sciovia a fune</string>
|
||||||
|
<string name="poi_aerialway_goods">Sciovia pro ogetos</string>
|
||||||
|
<string name="poi_aerialway_magic_carpet">Sciovia a tapete</string>
|
||||||
|
|
||||||
|
<string name="poi_tunnel">Galleria</string>
|
||||||
|
<string name="poi_bridge">Ponte</string>
|
||||||
|
|
||||||
|
<string name="poi_speed_camera">Autovelox</string>
|
||||||
|
<string name="poi_turning_circle">Retunda pro furriada de martza</string>
|
||||||
|
<string name="poi_water_well">Putzu</string>
|
||||||
|
<string name="poi_water_works">Impiantu ìdricu</string>
|
||||||
|
<string name="poi_wastewater_plant">Depuradore de sas abbas</string>
|
||||||
|
<string name="poi_water_tower">Turre ìdrica</string>
|
||||||
|
<string name="poi_dam">Diga</string>
|
||||||
|
<string name="poi_water_mill">Mulinu ad abba</string>
|
||||||
|
|
||||||
|
<string name="poi_power_transformer">Trasformadore</string>
|
||||||
|
<string name="poi_power_plant">Tzentrale elètrica</string>
|
||||||
|
<string name="poi_post_office">Ufìtziu postale</string>
|
||||||
|
<string name="poi_telephone">Telèfonu</string>
|
||||||
|
<string name="poi_communication_tower">Turre telecomunicatziones</string>
|
||||||
|
<string name="poi_telephone_exchange">Tzentralinu telefònicu</string>
|
||||||
|
|
||||||
|
<string name="poi_astronomical_observatory">Osservatòriu astronòmicu</string>
|
||||||
|
<string name="poi_construction">Fraigada</string>
|
||||||
|
<string name="poi_works">Fàbrica</string>
|
||||||
|
<string name="poi_adit">Intrada de una galleria minerària</string>
|
||||||
|
<string name="poi_petroleum_well">Putzu petrolìferu</string>
|
||||||
|
<string name="poi_survey_point">Puntu geodèticu</string>
|
||||||
|
<string name="poi_windmill">Mulinu a bentu</string>
|
||||||
|
<string name="poi_quarry">Cava</string>
|
||||||
|
<string name="poi_vineyard">Bìngia</string>
|
||||||
|
<string name="poi_orchard">Fruttedu</string>
|
||||||
|
<string name="poi_salt_pond">Salina</string>
|
||||||
|
<string name="poi_cricket_nets">Campu de cricket inghiriadu dae retzas</string>
|
||||||
|
|
||||||
|
<string name="poi_driving_school">Iscola de ghia</string>
|
||||||
|
<string name="poi_school">Iscola</string>
|
||||||
|
<string name="poi_college">Collègiu</string>
|
||||||
|
<string name="poi_university">Universidade</string>
|
||||||
|
|
||||||
|
<string name="poi_courthouse">Tribunale</string>
|
||||||
|
<string name="poi_prison">Càrtzere</string>
|
||||||
|
<string name="poi_register_office">Anàgrafe</string>
|
||||||
|
<string name="poi_embassy">Ambassada</string>
|
||||||
|
<string name="poi_government">Ufìtziu pùblicu</string>
|
||||||
|
<string name="poi_bailiff">Ufitziale giuditziàriu</string>
|
||||||
|
<string name="poi_prosecutor">Pùblicu ministeru</string>
|
||||||
|
<string name="poi_migration">Ufìtziu migratzione</string>
|
||||||
|
<string name="poi_tax_inspection">Guàrdia de finàntzia</string>
|
||||||
|
<string name="poi_administrative_office">Ufìtziu amministrativu</string>
|
||||||
|
<string name="poi_city">Tzitade cabu-de-logu de provìntzia</string>
|
||||||
|
<string name="poi_town">Tzitade</string>
|
||||||
|
<string name="poi_village">Bidda</string>
|
||||||
|
<string name="poi_hamlet">Bidditzolu</string>
|
||||||
|
<string name="poi_isolated_dwelling">Domo/os isolada/as</string>
|
||||||
|
<string name="poi_suburb">Apendìtziu</string>
|
||||||
|
<string name="poi_neighbourhood">Bighinadu</string>
|
||||||
|
<string name="poi_locality">Localidade</string>
|
||||||
|
|
||||||
|
<string name="poi_pharmacy">Potecaria</string>
|
||||||
|
<string name="poi_hospital">Ospidale</string>
|
||||||
|
<string name="poi_doctors">Dutore</string>
|
||||||
|
<string name="poi_clinic">Clìnica</string>
|
||||||
|
<string name="poi_dentist">Dentista</string>
|
||||||
|
<string name="poi_veterinary">Veterinàriu</string>
|
||||||
|
<string name="poi_sanatorium">Sanatòriu</string>
|
||||||
|
<string name="poi_healthcare_alternative">Meighina alternativa</string>
|
||||||
|
<string name="poi_blood_bank">Banca de su sàmbene</string>
|
||||||
|
<string name="poi_healthcare_centre">Tzentru mèdicu</string>
|
||||||
|
<string name="poi_midwife">Levadora</string>
|
||||||
|
<string name="poi_optometrist">Optometrista</string>
|
||||||
|
<string name="poi_physiotherapist">Fisioterapista</string>
|
||||||
|
<string name="poi_podiatrist">Podòlogu</string>
|
||||||
|
<string name="poi_psychotherapist">Psicoterapèuta</string>
|
||||||
|
<string name="poi_healthcare_rehabilitation">Riabilitassione</string>
|
||||||
|
<string name="poi_speech_therapist">Logopedista</string>
|
||||||
|
<string name="poi_healthcare_yes">Istrutura mèdica</string>
|
||||||
|
|
||||||
|
<string name="poi_insurance">Asseguratzione</string>
|
||||||
|
<string name="poi_estate_agent">Butega immobiliare</string>
|
||||||
|
<string name="poi_lawyer">Abogadu</string>
|
||||||
|
<string name="poi_ngo">ONG</string>
|
||||||
|
<string name="poi_town_hall">Munitzìpiu</string>
|
||||||
|
<string name="poi_employment_agency">Ufìtziu pro su traballu</string>
|
||||||
|
<string name="poi_it_office">Ufìtziu IT</string>
|
||||||
|
<string name="poi_newspaper_office">Redatzione de giornale</string>
|
||||||
|
<string name="poi_architect_office">Istùdiu de architetura</string>
|
||||||
|
<string name="poi_advertising_agency">Agentzia de publitzidade</string>
|
||||||
|
<string name="poi_educational_institution">Istitudu iscolàsticu</string>
|
||||||
|
<string name="poi_studio">Istùdiu de registratzione</string>
|
||||||
|
<string name="poi_bookmaker">Iscummissas</string>
|
||||||
|
|
||||||
|
<string name="poi_stadium">Istàdiu</string>
|
||||||
|
<string name="poi_sports_centre">Tzentru isportìvu</string>
|
||||||
|
<string name="poi_golf_course">Campu de golf</string>
|
||||||
|
<string name="poi_ice_rink">Pista pro patinare in astra</string>
|
||||||
|
<string name="poi_running_track">Pista pro cùrrere</string>
|
||||||
|
<string name="poi_bicycle_track">Pista pro bitziclètas</string>
|
||||||
|
<string name="poi_horse_track">Pista pro caddos</string>
|
||||||
|
<string name="poi_athletics">Atlètica</string>
|
||||||
|
<string name="poi_australian_football">Football australianu</string>
|
||||||
|
<string name="poi_baseball">Baseball</string>
|
||||||
|
<string name="poi_basketball">Basket</string>
|
||||||
|
<string name="poi_boules">Botzas</string>
|
||||||
|
<string name="poi_canoe">Canoa</string>
|
||||||
|
<string name="poi_chess">Iscacos</string>
|
||||||
|
<string name="poi_cricket">Cricket</string>
|
||||||
|
<string name="poi_croquet">Croquet</string>
|
||||||
|
<string name="poi_cycling">Tziclismu</string>
|
||||||
|
<string name="poi_dog_racing">Cursa de sos canes</string>
|
||||||
|
<string name="poi_equestrian">Equitassione</string>
|
||||||
|
<string name="poi_golf">Golf</string>
|
||||||
|
<string name="poi_gymnastics">Ginnàstica</string>
|
||||||
|
<string name="poi_hockey">Hockey</string>
|
||||||
|
<string name="poi_horse_racing">Cursas de sos caddos</string>
|
||||||
|
<string name="poi_ice_skating">Patinàgiu in s\'astra</string>
|
||||||
|
<string name="poi_korfbal">Korfbal</string>
|
||||||
|
<string name="poi_multi_sport">Prus isports</string>
|
||||||
|
<string name="poi_paddle_tennis">Paddle tènnis</string>
|
||||||
|
<string name="poi_pelota">Pelota</string>
|
||||||
|
<string name="poi_racquet">Racquetball</string>
|
||||||
|
<string name="poi_roller_skating">Patinàgiu a rodas</string>
|
||||||
|
<string name="poi_rowing">Canotàgiu</string>
|
||||||
|
<string name="poi_rugby_union">Rugby a 15</string>
|
||||||
|
<string name="poi_rugby_league">Rugby a 13</string>
|
||||||
|
<string name="poi_skating">Patinàgiu</string>
|
||||||
|
<string name="poi_skateboard">Skateboard</string>
|
||||||
|
<string name="poi_soccer">Fubalu</string>
|
||||||
|
<string name="poi_swimming">Piscina</string>
|
||||||
|
<string name="poi_tennis">Tennis</string>
|
||||||
|
<string name="poi_toboggan">Toboga</string>
|
||||||
|
<string name="poi_museum">Museu</string>
|
||||||
|
<string name="poi_attraction">Attràida turìstica</string>
|
||||||
|
<string name="poi_memorial">Memoriale</string>
|
||||||
|
<string name="poi_artwork">Opera d\'arte</string>
|
||||||
|
<string name="poi_archaeological_site">Giassu/situ archeològicu</string>
|
||||||
|
<string name="poi_battlefield">Campu de batalla</string>
|
||||||
|
<string name="poi_boundary_stone">Pedra de làcana</string>
|
||||||
|
<string name="poi_castle">Casteddu</string>
|
||||||
|
<string name="poi_city_gate">Ghenna de intrada a sa tzitade</string>
|
||||||
|
<string name="poi_fort">Forte</string>
|
||||||
|
<string name="poi_fountain">Funtana</string>
|
||||||
|
<string name="poi_ruins_historic">Ruinas istòricas</string>
|
||||||
|
<string name="poi_rune_stone">Pedra rùnica</string>
|
||||||
|
<string name="poi_ship_historic">Nave istòrica</string>
|
||||||
|
<string name="poi_mine_historic">Cava istòrica</string>
|
||||||
|
<string name="poi_monument">Monumentu</string>
|
||||||
|
<string name="poi_zoo">Zoo</string>
|
||||||
|
<string name="poi_theme_park">Parcu a tema</string>
|
||||||
|
|
||||||
|
<string name="poi_hotel">Albergo</string>
|
||||||
|
<string name="poi_hostel">Posada</string>
|
||||||
|
<string name="poi_motel">Motel</string>
|
||||||
|
<string name="poi_chalet">Chalet</string>
|
||||||
|
|
||||||
|
<string name="poi_place_of_worship">Logu de cultu</string>
|
||||||
|
<string name="poi_place_of_worship_christian">Logu de cultu: cristianu</string>
|
||||||
|
<string name="poi_place_of_worship_jewish">Logu de cultu: ebreu</string>
|
||||||
|
<string name="poi_place_of_worship_muslim">Logu de cultu: musulmanu</string>
|
||||||
|
<string name="poi_place_of_worship_sikh">Logu de cultu: sikh</string>
|
||||||
|
<string name="poi_place_of_worship_buddhist">Logu de cultu: buddista</string>
|
||||||
|
<string name="poi_place_of_worship_hindu">Logu de cultu: induista</string>
|
||||||
|
<string name="poi_place_of_worship_shinto">Logu de cultu: shintoista</string>
|
||||||
|
<string name="poi_place_of_worship_taoist">Logu de cultu: taoista</string>
|
||||||
|
<string name="poi_monastery">Monastèriu/Muristene</string>
|
||||||
|
<string name="poi_historic_monastery">Monastèriu/Muristene istòricu</string>
|
||||||
|
<string name="poi_wayside_cross">Rughe istòrica</string>
|
||||||
|
<string name="poi_wayside_shrine">Tabernàculu istòricu</string>
|
||||||
|
<string name="poi_tourism_information">Informatziones turìsticas</string>
|
||||||
|
<string name="poi_clock">Relògiu</string>
|
||||||
|
<string name="poi_travel_agent">Agentzia de biàgios</string>
|
||||||
|
<string name="poi_viewpoint">Puntu panoràmicu</string>
|
||||||
|
<string name="poi_camp_site">Campègiu</string>
|
||||||
|
<string name="poi_caravan_site">Tretu pro caravan e camper</string>
|
||||||
|
<string name="poi_picnic_site">Logu atretzadu pro picnic</string>
|
||||||
|
<string name="poi_spring">Mitza</string>
|
||||||
|
<string name="poi_geyser">Geyser</string>
|
||||||
|
<string name="poi_cemetery">Campusantu</string>
|
||||||
|
<string name="poi_grave_yard">Campusantu</string>
|
||||||
|
<string name="poi_funicular">Funiculare</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -1787,5 +1787,5 @@ Si cussigiat de annànghere unu o prus puntos intermedios pro megiorare sas pres
|
||||||
<string name="show_all">AMMUSTRA TOTU</string>
|
<string name="show_all">AMMUSTRA TOTU</string>
|
||||||
<string name="coordinates">Coordinatas</string>
|
<string name="coordinates">Coordinatas</string>
|
||||||
<string name="map_update">Mapas</string>
|
<string name="map_update">Mapas</string>
|
||||||
<string name="error_avoid_specific_road">No est istada agatada peruna istada a curtzu</string>
|
<string name="error_avoid_specific_road">No est istada agatada peruna istrada a curtzu</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -10,6 +10,8 @@
|
||||||
PLEASE: Have a look at http://code.google.com/p/osmand/wiki/UIConsistency, it may really improve your and our work :-) Thx - Hardy
|
PLEASE: Have a look at http://code.google.com/p/osmand/wiki/UIConsistency, it may really improve your and our work :-) Thx - Hardy
|
||||||
-->
|
-->
|
||||||
<string name="everything_up_to_date">Everything up to date</string>
|
<string name="everything_up_to_date">Everything up to date</string>
|
||||||
|
<string name="use_opengl_render">Use opengl rendering</string>
|
||||||
|
<string name="use_opengl_render_descr">Use hardware accelerated opengl rendering (may not work on some device)</string>
|
||||||
<string name="error_avoid_specific_road">Nearest road was not found</string>
|
<string name="error_avoid_specific_road">Nearest road was not found</string>
|
||||||
<string name="home_button">Home</string>
|
<string name="home_button">Home</string>
|
||||||
<string name="osmo_use_https_descr">Use secure connection with server</string>
|
<string name="osmo_use_https_descr">Use secure connection with server</string>
|
||||||
|
@ -73,8 +75,6 @@
|
||||||
<string name="print_route">Print route</string>
|
<string name="print_route">Print route</string>
|
||||||
<string name="fav_point_dublicate">Favorite point name duplicate</string>
|
<string name="fav_point_dublicate">Favorite point name duplicate</string>
|
||||||
<string name="fav_point_dublicate_message">We changed your favorite point name to %1$s to avoid duplicated names.</string>
|
<string name="fav_point_dublicate_message">We changed your favorite point name to %1$s to avoid duplicated names.</string>
|
||||||
<string name="use_native_render">Use native rendering</string>
|
|
||||||
<string name="use_native_render_descr">Use C++ rendering instead of Java</string>
|
|
||||||
<string name="text_size_descr">Set the text size on the map.</string>
|
<string name="text_size_descr">Set the text size on the map.</string>
|
||||||
<string name="text_size">Text size</string>
|
<string name="text_size">Text size</string>
|
||||||
<string name="traffic_warning_speed_limit">Speed limit</string>
|
<string name="traffic_warning_speed_limit">Speed limit</string>
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package net.osmand.core.android;
|
package net.osmand.core.android;
|
||||||
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
@ -10,48 +9,53 @@ import net.osmand.core.jni.IObfsCollection;
|
||||||
import net.osmand.core.jni.IRasterMapLayerProvider;
|
import net.osmand.core.jni.IRasterMapLayerProvider;
|
||||||
import net.osmand.core.jni.MapObjectsSymbolsProvider;
|
import net.osmand.core.jni.MapObjectsSymbolsProvider;
|
||||||
import net.osmand.core.jni.MapPresentationEnvironment;
|
import net.osmand.core.jni.MapPresentationEnvironment;
|
||||||
|
import net.osmand.core.jni.MapPresentationEnvironment.LanguagePreference;
|
||||||
import net.osmand.core.jni.MapPrimitivesProvider;
|
import net.osmand.core.jni.MapPrimitivesProvider;
|
||||||
import net.osmand.core.jni.MapPrimitiviser;
|
import net.osmand.core.jni.MapPrimitiviser;
|
||||||
import net.osmand.core.jni.MapRasterLayerProvider_Software;
|
import net.osmand.core.jni.MapRasterLayerProvider_Software;
|
||||||
|
import net.osmand.core.jni.MapStylesCollection;
|
||||||
import net.osmand.core.jni.ObfMapObjectsProvider;
|
import net.osmand.core.jni.ObfMapObjectsProvider;
|
||||||
import net.osmand.core.jni.QStringStringHash;
|
import net.osmand.core.jni.QStringStringHash;
|
||||||
import net.osmand.core.jni.MapPresentationEnvironment.LanguagePreference;
|
|
||||||
import net.osmand.core.jni.ResolvedMapStyle;
|
import net.osmand.core.jni.ResolvedMapStyle;
|
||||||
|
import net.osmand.plus.OsmandApplication;
|
||||||
|
import net.osmand.plus.OsmandSettings;
|
||||||
|
import net.osmand.plus.OsmandSettings.CommonPreference;
|
||||||
|
import net.osmand.plus.render.RendererRegistry;
|
||||||
|
import net.osmand.render.RenderingRuleProperty;
|
||||||
|
import net.osmand.render.RenderingRulesStorage;
|
||||||
|
import net.osmand.util.Algorithms;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Context container and utility class for MapRendererView and derivatives.
|
* Context container and utility class for MapRendererView and derivatives.
|
||||||
*
|
|
||||||
* @author Alexey Pelykh
|
* @author Alexey Pelykh
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class MapRendererContext {
|
public class MapRendererContext {
|
||||||
|
|
||||||
public MapRendererContext() {
|
private static final int OBF_RASTER_LAYER = 0;
|
||||||
}
|
private OsmandApplication app;
|
||||||
|
|
||||||
public MapRendererContext(MapRendererView mapRendererView) {
|
// input parameters
|
||||||
_mapRendererView = mapRendererView;
|
private MapStylesCollection mapStylesCollection;
|
||||||
}
|
private IObfsCollection obfsCollection;
|
||||||
|
|
||||||
/**
|
private boolean nightMode;
|
||||||
* Synchronisation object used to perform state changes atomically
|
private final float density;
|
||||||
*/
|
|
||||||
private final Object _syncObject = new Object();
|
|
||||||
|
|
||||||
/**
|
// ached objects
|
||||||
* Reference to map renderer view that is currently managed by this
|
private Map<String, ResolvedMapStyle> mapStyles = new HashMap<String, ResolvedMapStyle>();
|
||||||
* context
|
private CachedMapPresentation presentationObjectParams;
|
||||||
*/
|
private MapPresentationEnvironment mapPresentationEnvironment;
|
||||||
private MapRendererView _mapRendererView;
|
|
||||||
|
|
||||||
/**
|
private IMapTiledSymbolsProvider obfMapSymbolsProvider;
|
||||||
* Get currently bound map renderer view
|
private IRasterMapLayerProvider obfMapRasterLayerProvider;
|
||||||
* @return Reference to MapRendererView
|
private MapRendererView mapRendererView;
|
||||||
*/
|
|
||||||
public MapRendererView getMapRendererView() {
|
private float cachedReferenceTileSize;
|
||||||
synchronized (_syncObject) {
|
|
||||||
return _mapRendererView;
|
public MapRendererContext(OsmandApplication app, float density) {
|
||||||
}
|
this.app = app;
|
||||||
|
this.density = density;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -59,419 +63,200 @@ public class MapRendererContext {
|
||||||
* @param mapRendererView Reference to MapRendererView
|
* @param mapRendererView Reference to MapRendererView
|
||||||
*/
|
*/
|
||||||
public void setMapRendererView(MapRendererView mapRendererView) {
|
public void setMapRendererView(MapRendererView mapRendererView) {
|
||||||
synchronized (_syncObject) {
|
boolean update = (this.mapRendererView != mapRendererView);
|
||||||
boolean update = (_mapRendererView != mapRendererView);
|
if (!update) {
|
||||||
if (!update)
|
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
_mapRendererView = mapRendererView;
|
this.mapRendererView = mapRendererView;
|
||||||
if (_mapRendererView != null)
|
if (mapRendererView != null) {
|
||||||
apply();
|
applyCurrentContextToView();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public void setNightMode(boolean nightMode) {
|
||||||
* Display density factor
|
if (nightMode != this.nightMode) {
|
||||||
*/
|
this.nightMode = nightMode;
|
||||||
private float _displayDensityFactor = 1;
|
updateMapSettings();
|
||||||
|
|
||||||
/**
|
|
||||||
* Reference tile size on screen in pixels
|
|
||||||
*/
|
|
||||||
private float _referenceTileSize = 256;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Raster tile size in texels
|
|
||||||
*/
|
|
||||||
private int _rasterTileSize = 256;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get current display density factor
|
|
||||||
* @return Display density factor
|
|
||||||
*/
|
|
||||||
public float getDisplayDensityFactor() {
|
|
||||||
synchronized (_syncObject) {
|
|
||||||
return _displayDensityFactor;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public void updateMapSettings() {
|
||||||
* Set display density factor and update context (if needed)
|
if (mapRendererView instanceof AtlasMapRendererView && cachedReferenceTileSize != getReferenceTileSize()) {
|
||||||
* @param displayDensityFactor New display density factor
|
((AtlasMapRendererView) mapRendererView).setReferenceTileSizeOnScreenInPixels(getReferenceTileSize());
|
||||||
*/
|
}
|
||||||
public void setDisplayDensityFactor(float displayDensityFactor) {
|
if(mapPresentationEnvironment != null) {
|
||||||
synchronized (_syncObject) {
|
|
||||||
boolean update = (_displayDensityFactor != displayDensityFactor);
|
|
||||||
if (!update)
|
|
||||||
return;
|
|
||||||
|
|
||||||
_displayDensityFactor = displayDensityFactor;
|
|
||||||
_referenceTileSize = 256.0f * _displayDensityFactor;
|
|
||||||
_rasterTileSize = Integer.highestOneBit((int)_referenceTileSize - 1) * 2;
|
|
||||||
|
|
||||||
if (_mapRendererView instanceof AtlasMapRendererView)
|
|
||||||
((AtlasMapRendererView)_mapRendererView).setReferenceTileSizeOnScreenInPixels(_referenceTileSize);
|
|
||||||
if (_mapPresentationEnvironment != null)
|
|
||||||
updateMapPresentationEnvironment();
|
updateMapPresentationEnvironment();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Reference to resolved map style (if used)
|
|
||||||
*/
|
|
||||||
private ResolvedMapStyle _mapStyle;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get current map style
|
|
||||||
* @return Reference to current map style
|
|
||||||
*/
|
|
||||||
public ResolvedMapStyle getMapStyle() {
|
|
||||||
synchronized (_syncObject) {
|
|
||||||
return _mapStyle;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Set map style and update context (if needed)
|
|
||||||
* @param mapStyle
|
|
||||||
*/
|
|
||||||
public void setMapStyle(ResolvedMapStyle mapStyle) {
|
|
||||||
synchronized (_syncObject) {
|
|
||||||
boolean update = (_mapStyle != mapStyle);
|
|
||||||
if (!update)
|
|
||||||
return;
|
|
||||||
|
|
||||||
_mapStyle = mapStyle;
|
|
||||||
if (_mapPresentationEnvironment != null)
|
|
||||||
updateMapPresentationEnvironment();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Reference to map style settings (if present)
|
|
||||||
*/
|
|
||||||
private Map<String, String> _mapStyleSettings;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get current map style settings
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public Map<String, String> getMapStyleSettings() {
|
|
||||||
synchronized (_syncObject) {
|
|
||||||
if (_mapStyleSettings == null)
|
|
||||||
return null;
|
|
||||||
return Collections.unmodifiableMap(_mapStyleSettings);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Set map style settings and update context (if needed)
|
|
||||||
* @param mapStyleSettings Map style settings
|
|
||||||
*/
|
|
||||||
public void setMapStyleSettings(Map<String, String> mapStyleSettings) {
|
|
||||||
synchronized (_syncObject) {
|
|
||||||
boolean update = !_mapStyleSettings.equals(mapStyleSettings);
|
|
||||||
if (!update)
|
|
||||||
return;
|
|
||||||
|
|
||||||
_mapStyleSettings = new HashMap<String, String>(mapStyleSettings);
|
|
||||||
if (_mapPresentationEnvironment != null)
|
|
||||||
updateMapPresentationEnvironment();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Locale language
|
|
||||||
*/
|
|
||||||
private String _localeLanguageId = "en";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get current locale language
|
|
||||||
* @return Locale language identifier
|
|
||||||
*/
|
|
||||||
public String getLocaleLanguageId() {
|
|
||||||
synchronized (_syncObject) {
|
|
||||||
return _localeLanguageId;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Set current locale language and update context (if needed)
|
|
||||||
* @param localeLanguageId Locale language identifier
|
|
||||||
*/
|
|
||||||
public void setLocaleLanguageId(String localeLanguageId) {
|
|
||||||
synchronized (_syncObject) {
|
|
||||||
boolean update = !_localeLanguageId.equals(localeLanguageId);
|
|
||||||
if (!update)
|
|
||||||
return;
|
|
||||||
|
|
||||||
_localeLanguageId = localeLanguageId;
|
|
||||||
if (_mapPresentationEnvironment != null)
|
|
||||||
updateMapPresentationEnvironment();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Language preference
|
|
||||||
*/
|
|
||||||
private LanguagePreference _languagePreference = LanguagePreference.LocalizedAndNative;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get current language preference
|
|
||||||
* @return Language preference
|
|
||||||
*/
|
|
||||||
public LanguagePreference getLanguagePreference() {
|
|
||||||
synchronized (_syncObject) {
|
|
||||||
return _languagePreference;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Set language preference and update context (if needed)
|
|
||||||
* @param languagePreference
|
|
||||||
*/
|
|
||||||
public void setLanguagePreference(LanguagePreference languagePreference) {
|
|
||||||
synchronized (_syncObject) {
|
|
||||||
boolean update = (_languagePreference != languagePreference);
|
|
||||||
if (!update)
|
|
||||||
return;
|
|
||||||
|
|
||||||
_languagePreference = languagePreference;
|
|
||||||
if (_mapPresentationEnvironment != null)
|
|
||||||
updateMapPresentationEnvironment();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Reference to OBFs collection (if present)
|
|
||||||
*/
|
|
||||||
private IObfsCollection _obfsCollection;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get current OBFs collection
|
|
||||||
* @return OBFs collection
|
|
||||||
*/
|
|
||||||
public IObfsCollection getObfsCollection() {
|
|
||||||
synchronized (_syncObject) {
|
|
||||||
return _obfsCollection;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Set OBFs collection and update context (if needed)
|
|
||||||
* @param obfsCollection
|
|
||||||
*/
|
|
||||||
public void setObfsCollection(IObfsCollection obfsCollection) {
|
|
||||||
synchronized (_syncObject) {
|
|
||||||
boolean update = (_obfsCollection != obfsCollection);
|
|
||||||
if (!update)
|
|
||||||
return;
|
|
||||||
|
|
||||||
_obfsCollection = obfsCollection;
|
|
||||||
if (_obfMapObjectsProvider != null)
|
|
||||||
updateObfMapObjectsProvider();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Reference to map presentation environment (if used)
|
|
||||||
*/
|
|
||||||
private MapPresentationEnvironment _mapPresentationEnvironment;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Update map presentation environment and everything that depends on it
|
|
||||||
*/
|
|
||||||
private void updateMapPresentationEnvironment() {
|
|
||||||
// Create new map presentation environment
|
|
||||||
_mapPresentationEnvironment = new MapPresentationEnvironment(
|
|
||||||
_mapStyle,
|
|
||||||
_displayDensityFactor,
|
|
||||||
_localeLanguageId,
|
|
||||||
_languagePreference);
|
|
||||||
|
|
||||||
// Apply map style settings
|
|
||||||
if (_mapStyleSettings != null) {
|
|
||||||
QStringStringHash convertedStyleSettings = new QStringStringHash();
|
|
||||||
for (Iterator<Map.Entry<String, String>> itSetting = _mapStyleSettings
|
|
||||||
.entrySet().iterator(); itSetting.hasNext();) {
|
|
||||||
Map.Entry<String, String> setting = itSetting.next();
|
|
||||||
convertedStyleSettings.set(setting.getKey(), setting.getValue());
|
|
||||||
}
|
|
||||||
_mapPresentationEnvironment.setSettings(convertedStyleSettings);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Update all dependencies
|
|
||||||
if (_mapPrimitiviser != null)
|
|
||||||
updateMapPrimitiviser();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Reference to map primitiviser (if used)
|
|
||||||
*/
|
|
||||||
private MapPrimitiviser _mapPrimitiviser;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Update map primitiviser and everything that depends on it
|
|
||||||
*/
|
|
||||||
private void updateMapPrimitiviser() {
|
|
||||||
// Create new map primitiviser
|
|
||||||
_mapPrimitiviser = new MapPrimitiviser(_mapPresentationEnvironment);
|
|
||||||
|
|
||||||
// Update all dependencies
|
|
||||||
if (_mapPrimitivesProvider != null)
|
|
||||||
updateMapPrimitivesProvider();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Reference to OBF map objects provider (if used)
|
|
||||||
*/
|
|
||||||
private ObfMapObjectsProvider _obfMapObjectsProvider;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Update OBF map objects provider and everything that depends on it
|
|
||||||
*/
|
|
||||||
private void updateObfMapObjectsProvider() {
|
|
||||||
_obfMapObjectsProvider = new ObfMapObjectsProvider(
|
|
||||||
_obfsCollection);
|
|
||||||
|
|
||||||
// Update all dependencies
|
|
||||||
if (_mapPrimitivesProvider != null)
|
|
||||||
updateMapPrimitivesProvider();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Reference to map primitives provider (if used)
|
|
||||||
*/
|
|
||||||
private MapPrimitivesProvider _mapPrimitivesProvider;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Update map primitives provider and everything that depends on it
|
|
||||||
*/
|
|
||||||
private void updateMapPrimitivesProvider() {
|
|
||||||
// Create new map primitives provider
|
|
||||||
_mapPrimitivesProvider = new MapPrimitivesProvider(
|
|
||||||
_obfMapObjectsProvider,
|
|
||||||
_mapPrimitiviser,
|
|
||||||
_rasterTileSize);
|
|
||||||
|
|
||||||
// Update all dependencies
|
|
||||||
if (_obfMapRasterLayerProvider != null)
|
|
||||||
updateObfMapRasterLayerProvider();
|
|
||||||
if (_obfMapSymbolsProvider != null)
|
|
||||||
updateObfMapSymbolsProvider();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Reference to OBF map raster layer provider (if used)
|
|
||||||
*/
|
|
||||||
private IRasterMapLayerProvider _obfMapRasterLayerProvider;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Index of OBF map raster layer in bound map renderer view (if set)
|
|
||||||
*/
|
|
||||||
private Integer _obfMapRasterLayer;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Update OBF map raster layer provider and everything that depends on it
|
|
||||||
*/
|
|
||||||
private void updateObfMapRasterLayerProvider() {
|
|
||||||
// Create new OBF map raster layer provider
|
|
||||||
_obfMapRasterLayerProvider = new MapRasterLayerProvider_Software(
|
|
||||||
_mapPrimitivesProvider);
|
|
||||||
|
|
||||||
// In case there's bound view and configured layer, perform setup
|
|
||||||
if(_mapRendererView != null && _obfMapRasterLayer != null)
|
|
||||||
_mapRendererView.setMapLayerProvider(_obfMapRasterLayer, _obfMapRasterLayerProvider);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Reference to OBF map symbols provider (if used)
|
|
||||||
*/
|
|
||||||
private IMapTiledSymbolsProvider _obfMapSymbolsProvider;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Update OBF map symbols provider and everything that depends on it
|
|
||||||
*/
|
|
||||||
private void updateObfMapSymbolsProvider() {
|
|
||||||
// If there's current provider and bound view, remove it
|
|
||||||
if (_obfMapSymbolsProvider != null && _mapRendererView != null)
|
|
||||||
_mapRendererView.removeSymbolsProvider(_obfMapSymbolsProvider);
|
|
||||||
|
|
||||||
// Create new OBF map symbols provider
|
|
||||||
_obfMapSymbolsProvider = new MapObjectsSymbolsProvider(
|
|
||||||
_mapPrimitivesProvider,
|
|
||||||
_referenceTileSize);
|
|
||||||
|
|
||||||
// If there's bound view, add new provider
|
|
||||||
if (_mapRendererView != null)
|
|
||||||
_mapRendererView.addSymbolsProvider(_obfMapSymbolsProvider);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Apply current context to view
|
|
||||||
*/
|
|
||||||
private void apply() {
|
|
||||||
if (_mapRendererView instanceof AtlasMapRendererView)
|
|
||||||
((AtlasMapRendererView)_mapRendererView).setReferenceTileSizeOnScreenInPixels(_referenceTileSize);
|
|
||||||
|
|
||||||
// Layers
|
|
||||||
if (_obfMapRasterLayer != null && _obfMapRasterLayerProvider != null)
|
|
||||||
_mapRendererView.setMapLayerProvider(_obfMapRasterLayer, _obfMapRasterLayerProvider);
|
|
||||||
|
|
||||||
// Symbols
|
|
||||||
if (_obfMapSymbolsProvider != null)
|
|
||||||
_mapRendererView.addSymbolsProvider(_obfMapSymbolsProvider);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Setup OBF map on layer 0 with symbols
|
* Setup OBF map on layer 0 with symbols
|
||||||
* @param obfsCollection OBFs collection
|
* @param obfsCollection OBFs collection
|
||||||
*/
|
*/
|
||||||
public void setupObfMap(ResolvedMapStyle mapStyle, IObfsCollection obfsCollection) {
|
public void setupObfMap(MapStylesCollection mapStylesCollection, IObfsCollection obfsCollection) {
|
||||||
setupObfMap(mapStyle, obfsCollection, 0, true);
|
this.obfsCollection = obfsCollection;
|
||||||
|
this.mapStylesCollection = mapStylesCollection;
|
||||||
|
updateMapPresentationEnvironment();
|
||||||
|
recreateRasterAndSymbolsProvider();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected float getDisplayDensityFactor() {
|
||||||
|
return (float) Math.pow(2, Math.sqrt((app.getSettings().getSettingsZoomScale() + density)));
|
||||||
|
}
|
||||||
|
|
||||||
|
protected int getRasterTileSize() {
|
||||||
|
return Integer.highestOneBit((int) getReferenceTileSize() - 1) * 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
private float getReferenceTileSize() {
|
||||||
|
return 256 * getDisplayDensityFactor();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Setup OBF map on specified layer with optional symbols
|
* Update map presentation environment and everything that depends on it
|
||||||
* @param obfsCollection OBFs collection
|
|
||||||
* @param layer Layer index
|
|
||||||
* @param withSymbols True if with symbols, false otherwise
|
|
||||||
*/
|
*/
|
||||||
public void setupObfMap(ResolvedMapStyle mapStyle,
|
private void updateMapPresentationEnvironment() {
|
||||||
IObfsCollection obfsCollection,
|
float displayDensityFactor = getDisplayDensityFactor();
|
||||||
int layer,
|
// Create new map presentation environment
|
||||||
boolean withSymbols) {
|
String langId = app.getSettings().MAP_PREFERRED_LOCALE.get();
|
||||||
synchronized (_syncObject) {
|
// TODO make setting
|
||||||
boolean update = false;
|
LanguagePreference langPref = LanguagePreference.LocalizedOrNative;
|
||||||
|
String rendName = app.getSettings().RENDERER.get();
|
||||||
if (_mapStyle != mapStyle) {
|
if (rendName.length() == 0 || rendName.equals(RendererRegistry.DEFAULT_RENDER)) {
|
||||||
_mapStyle = mapStyle;
|
rendName = "default";
|
||||||
update = true;
|
}
|
||||||
|
if (!mapStyles.containsKey(rendName)) {
|
||||||
|
mapStyles.put(rendName, mapStylesCollection.getResolvedStyleByName(rendName));
|
||||||
|
}
|
||||||
|
ResolvedMapStyle mapStyle = mapStyles.get(rendName);
|
||||||
|
CachedMapPresentation pres = new CachedMapPresentation(langId, langPref, mapStyle, displayDensityFactor);
|
||||||
|
if (this.presentationObjectParams == null || !this.presentationObjectParams.equalsFields(pres)) {
|
||||||
|
this.presentationObjectParams = pres;
|
||||||
|
mapPresentationEnvironment = new MapPresentationEnvironment(mapStyle, displayDensityFactor, langId,
|
||||||
|
langPref);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_obfsCollection != obfsCollection) {
|
QStringStringHash convertedStyleSettings = getMapStyleSettings();
|
||||||
_obfsCollection = obfsCollection;
|
mapPresentationEnvironment.setSettings(convertedStyleSettings);
|
||||||
update = true;
|
|
||||||
|
if (obfMapRasterLayerProvider != null || obfMapSymbolsProvider != null) {
|
||||||
|
recreateRasterAndSymbolsProvider();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_obfMapRasterLayer == null || _obfMapRasterLayer != layer) {
|
protected QStringStringHash getMapStyleSettings() {
|
||||||
_obfMapRasterLayer = layer;
|
// Apply map style settings
|
||||||
update = true;
|
OsmandSettings prefs = app.getSettings();
|
||||||
|
RenderingRulesStorage storage = app.getRendererRegistry().getCurrentSelectedRenderer();
|
||||||
|
Map<String, String> props = new HashMap<String, String>();
|
||||||
|
for (RenderingRuleProperty customProp : storage.PROPS.getCustomRules()) {
|
||||||
|
if (customProp.isBoolean()) {
|
||||||
|
CommonPreference<Boolean> pref = prefs.getCustomRenderBooleanProperty(customProp.getAttrName());
|
||||||
|
props.put(customProp.getAttrName(), pref.get() + "");
|
||||||
|
} else {
|
||||||
|
CommonPreference<String> settings = prefs.getCustomRenderProperty(customProp.getAttrName());
|
||||||
|
String res = settings.get();
|
||||||
|
if (!Algorithms.isEmpty(res)) {
|
||||||
|
props.put(customProp.getAttrName(), res);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (withSymbols != (_obfMapSymbolsProvider != null)) {
|
QStringStringHash convertedStyleSettings = new QStringStringHash();
|
||||||
update = true;
|
for (Iterator<Map.Entry<String, String>> itSetting = props.entrySet().iterator(); itSetting.hasNext();) {
|
||||||
|
Map.Entry<String, String> setting = itSetting.next();
|
||||||
|
convertedStyleSettings.set(setting.getKey(), setting.getValue());
|
||||||
|
}
|
||||||
|
if (nightMode) {
|
||||||
|
convertedStyleSettings.set("nightMode", "true");
|
||||||
|
}
|
||||||
|
return convertedStyleSettings;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!update)
|
private void recreateRasterAndSymbolsProvider() {
|
||||||
return;
|
// Create new map primitiviser
|
||||||
|
MapPrimitiviser mapPrimitiviser = new MapPrimitiviser(mapPresentationEnvironment);
|
||||||
|
ObfMapObjectsProvider obfMapObjectsProvider = new ObfMapObjectsProvider(obfsCollection);
|
||||||
|
// Create new map primitives provider
|
||||||
|
MapPrimitivesProvider mapPrimitivesProvider = new MapPrimitivesProvider(obfMapObjectsProvider, mapPrimitiviser,
|
||||||
|
getRasterTileSize());
|
||||||
|
updateObfMapRasterLayerProvider(mapPrimitivesProvider);
|
||||||
|
updateObfMapSymbolsProvider(mapPrimitivesProvider);
|
||||||
|
}
|
||||||
|
|
||||||
updateMapPresentationEnvironment();
|
private void updateObfMapRasterLayerProvider(MapPrimitivesProvider mapPrimitivesProvider) {
|
||||||
updateMapPrimitiviser();
|
// Create new OBF map raster layer provider
|
||||||
updateMapPrimitivesProvider();
|
obfMapRasterLayerProvider = new MapRasterLayerProvider_Software(mapPrimitivesProvider);
|
||||||
updateObfMapObjectsProvider();
|
// In case there's bound view and configured layer, perform setup
|
||||||
updateObfMapRasterLayerProvider();
|
if (mapRendererView != null) {
|
||||||
updateObfMapSymbolsProvider();
|
mapRendererView.setMapLayerProvider(OBF_RASTER_LAYER, obfMapRasterLayerProvider);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void updateObfMapSymbolsProvider(MapPrimitivesProvider mapPrimitivesProvider) {
|
||||||
|
// If there's current provider and bound view, remove it
|
||||||
|
if (obfMapSymbolsProvider != null && mapRendererView != null) {
|
||||||
|
mapRendererView.removeSymbolsProvider(obfMapSymbolsProvider);
|
||||||
|
}
|
||||||
|
// Create new OBF map symbols provider
|
||||||
|
obfMapSymbolsProvider = new MapObjectsSymbolsProvider(mapPrimitivesProvider, getReferenceTileSize());
|
||||||
|
// If there's bound view, add new provider
|
||||||
|
if (mapRendererView != null) {
|
||||||
|
mapRendererView.addSymbolsProvider(obfMapSymbolsProvider);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void applyCurrentContextToView() {
|
||||||
|
if (mapRendererView instanceof AtlasMapRendererView) {
|
||||||
|
cachedReferenceTileSize = getReferenceTileSize();
|
||||||
|
((AtlasMapRendererView)mapRendererView).setReferenceTileSizeOnScreenInPixels(cachedReferenceTileSize);
|
||||||
|
}
|
||||||
|
// Layers
|
||||||
|
if (obfMapRasterLayerProvider != null) {
|
||||||
|
mapRendererView.setMapLayerProvider(OBF_RASTER_LAYER, obfMapRasterLayerProvider);
|
||||||
|
}
|
||||||
|
// Symbols
|
||||||
|
if (obfMapSymbolsProvider != null) {
|
||||||
|
mapRendererView.addSymbolsProvider(obfMapSymbolsProvider);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private class CachedMapPresentation {
|
||||||
|
String langId ;
|
||||||
|
LanguagePreference langPref;
|
||||||
|
ResolvedMapStyle mapStyle;
|
||||||
|
double displayDensityFactor;
|
||||||
|
|
||||||
|
public CachedMapPresentation(String langId,
|
||||||
|
LanguagePreference langPref, ResolvedMapStyle mapStyle,
|
||||||
|
double displayDensityFactor) {
|
||||||
|
this.langId = langId;
|
||||||
|
this.langPref = langPref;
|
||||||
|
this.mapStyle = mapStyle;
|
||||||
|
this.displayDensityFactor = displayDensityFactor;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public boolean equalsFields(CachedMapPresentation other ) {
|
||||||
|
if (Double.doubleToLongBits(displayDensityFactor) != Double
|
||||||
|
.doubleToLongBits(other.displayDensityFactor))
|
||||||
|
return false;
|
||||||
|
if (langId == null) {
|
||||||
|
if (other.langId != null)
|
||||||
|
return false;
|
||||||
|
} else if (!langId.equals(other.langId))
|
||||||
|
return false;
|
||||||
|
if (langPref != other.langPref)
|
||||||
|
return false;
|
||||||
|
if (mapStyle == null) {
|
||||||
|
if (other.mapStyle != null)
|
||||||
|
return false;
|
||||||
|
} else if (!mapStyle.equals(other.mapStyle))
|
||||||
|
return false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -557,16 +557,16 @@ public class OsmandApplication extends Application {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!"qnx".equals(System.getProperty("os.name"))) {
|
if (!"qnx".equals(System.getProperty("os.name"))) {
|
||||||
if (osmandSettings.USE_NATIVE_RENDER.get()) {
|
if (osmandSettings.USE_OPENGL_RENDER.get()) {
|
||||||
if (!osmandSettings.CPP_RENDER_FAILED.get()) {
|
if (!osmandSettings.OPENGL_RENDER_FAILED.get()) {
|
||||||
osmandSettings.CPP_RENDER_FAILED.set(true);
|
osmandSettings.OPENGL_RENDER_FAILED.set(true);
|
||||||
boolean success = NativeCoreContext.tryCatchInit(this);
|
boolean success = NativeCoreContext.tryCatchInit(this);
|
||||||
if (success) {
|
if (success) {
|
||||||
osmandSettings.CPP_RENDER_FAILED.set(false);
|
osmandSettings.OPENGL_RENDER_FAILED.set(false);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// try next time once again ?
|
// try next time once again ?
|
||||||
osmandSettings.CPP_RENDER_FAILED.set(false);
|
osmandSettings.OPENGL_RENDER_FAILED.set(false);
|
||||||
warnings.add("Native OpenGL library is not supported. Please try again after exit");
|
warnings.add("Native OpenGL library is not supported. Please try again after exit");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1719,9 +1719,10 @@ public class OsmandSettings {
|
||||||
|
|
||||||
public final OsmandPreference<Boolean> NATIVE_RENDERING_FAILED = new BooleanPreference("native_rendering_failed_init", false).makeGlobal();
|
public final OsmandPreference<Boolean> NATIVE_RENDERING_FAILED = new BooleanPreference("native_rendering_failed_init", false).makeGlobal();
|
||||||
|
|
||||||
public final OsmandPreference<Boolean> USE_NATIVE_RENDER = new BooleanPreference("use_native_render", false).makeGlobal().cache();
|
public final OsmandPreference<Boolean> USE_OPENGL_RENDER = new BooleanPreference("use_opengl_render",
|
||||||
|
Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH).makeGlobal().cache();
|
||||||
|
|
||||||
public final OsmandPreference<Boolean> CPP_RENDER_FAILED = new BooleanPreference("cpp_render_failed", false).makeGlobal().cache();
|
public final OsmandPreference<Boolean> OPENGL_RENDER_FAILED = new BooleanPreference("opengl_render_failed", false).makeGlobal().cache();
|
||||||
|
|
||||||
|
|
||||||
// this value string is synchronized with settings_pref.xml preference name
|
// this value string is synchronized with settings_pref.xml preference name
|
||||||
|
|
|
@ -12,6 +12,7 @@ import java.util.Random;
|
||||||
import android.support.v4.app.FragmentManager;
|
import android.support.v4.app.FragmentManager;
|
||||||
import net.osmand.access.AccessibleAlertBuilder;
|
import net.osmand.access.AccessibleAlertBuilder;
|
||||||
import net.osmand.plus.OsmAndAppCustomization;
|
import net.osmand.plus.OsmAndAppCustomization;
|
||||||
|
import net.osmand.plus.OsmAndLocationProvider;
|
||||||
import net.osmand.plus.OsmandApplication;
|
import net.osmand.plus.OsmandApplication;
|
||||||
import net.osmand.plus.R;
|
import net.osmand.plus.R;
|
||||||
import net.osmand.plus.Version;
|
import net.osmand.plus.Version;
|
||||||
|
@ -71,6 +72,7 @@ public class DashboardActivity extends BaseDownloadActivity {
|
||||||
private static final int HELP_ID = 0;
|
private static final int HELP_ID = 0;
|
||||||
private static final int SETTINGS_ID = 1;
|
private static final int SETTINGS_ID = 1;
|
||||||
private static final int EXIT_ID = 2;
|
private static final int EXIT_ID = 2;
|
||||||
|
private OsmAndLocationProvider lp;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
@ -90,6 +92,7 @@ public class DashboardActivity extends BaseDownloadActivity {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
setContentView(R.layout.dashboard);
|
setContentView(R.layout.dashboard);
|
||||||
|
lp = getMyApplication().getLocationProvider();
|
||||||
|
|
||||||
final String textVersion = Version.getFullVersion(getMyApplication());
|
final String textVersion = Version.getFullVersion(getMyApplication());
|
||||||
getSupportActionBar().setTitle(textVersion);
|
getSupportActionBar().setTitle(textVersion);
|
||||||
|
|
|
@ -37,6 +37,7 @@ import net.osmand.plus.activities.search.SearchActivity;
|
||||||
import net.osmand.plus.base.FailSafeFuntions;
|
import net.osmand.plus.base.FailSafeFuntions;
|
||||||
import net.osmand.plus.base.MapViewTrackingUtilities;
|
import net.osmand.plus.base.MapViewTrackingUtilities;
|
||||||
import net.osmand.plus.helpers.GpxImportHelper;
|
import net.osmand.plus.helpers.GpxImportHelper;
|
||||||
|
import net.osmand.plus.helpers.WakeLockHelper;
|
||||||
import net.osmand.plus.render.RendererRegistry;
|
import net.osmand.plus.render.RendererRegistry;
|
||||||
import net.osmand.plus.resources.ResourceManager;
|
import net.osmand.plus.resources.ResourceManager;
|
||||||
import net.osmand.plus.routing.RoutingHelper;
|
import net.osmand.plus.routing.RoutingHelper;
|
||||||
|
@ -81,8 +82,7 @@ import android.widget.FrameLayout;
|
||||||
import android.widget.ProgressBar;
|
import android.widget.ProgressBar;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
public class MapActivity extends AccessibleActivity implements
|
public class MapActivity extends AccessibleActivity {
|
||||||
VoiceRouter.VoiceMessageListener {
|
|
||||||
|
|
||||||
private static final int SHOW_POSITION_MSG_ID = OsmAndConstants.UI_HANDLER_MAP_VIEW + 1;
|
private static final int SHOW_POSITION_MSG_ID = OsmAndConstants.UI_HANDLER_MAP_VIEW + 1;
|
||||||
private static final int LONG_KEYPRESS_MSG_ID = OsmAndConstants.UI_HANDLER_MAP_VIEW + 2;
|
private static final int LONG_KEYPRESS_MSG_ID = OsmAndConstants.UI_HANDLER_MAP_VIEW + 2;
|
||||||
|
@ -114,13 +114,9 @@ public class MapActivity extends AccessibleActivity implements
|
||||||
private StateChangedListener<ApplicationMode> applicationModeListener;
|
private StateChangedListener<ApplicationMode> applicationModeListener;
|
||||||
private FrameLayout lockView;
|
private FrameLayout lockView;
|
||||||
private GpxImportHelper gpxImportHelper;
|
private GpxImportHelper gpxImportHelper;
|
||||||
private PowerManager.WakeLock wakeLock = null;
|
private WakeLockHelper wakeLockHelper ;
|
||||||
private ReleaseWakeLocksRunnable releaseWakeLocksRunnable = new ReleaseWakeLocksRunnable();
|
|
||||||
private boolean active = false;
|
|
||||||
private boolean intentLocation = false;
|
private boolean intentLocation = false;
|
||||||
|
|
||||||
private DevicePolicyManager mDevicePolicyManager;
|
|
||||||
private ComponentName mDeviceAdmin;
|
|
||||||
|
|
||||||
private Notification getNotification() {
|
private Notification getNotification() {
|
||||||
Intent notificationIndent = new Intent(this, getMyApplication().getAppCustomization().getMapActivity());
|
Intent notificationIndent = new Intent(this, getMyApplication().getAppCustomization().getMapActivity());
|
||||||
|
@ -152,7 +148,7 @@ public class MapActivity extends AccessibleActivity implements
|
||||||
app.checkApplicationIsBeingInitialized(this, startProgressDialog);
|
app.checkApplicationIsBeingInitialized(this, startProgressDialog);
|
||||||
parseLaunchIntentLocation();
|
parseLaunchIntentLocation();
|
||||||
|
|
||||||
if(settings.USE_NATIVE_RENDER.get() && NativeCoreContext.isInit()) {
|
if(settings.USE_OPENGL_RENDER.get() && NativeCoreContext.isInit()) {
|
||||||
ViewStub stub = (ViewStub) findViewById(R.id.atlasMapRendererViewStub);
|
ViewStub stub = (ViewStub) findViewById(R.id.atlasMapRendererViewStub);
|
||||||
atlasMapRendererView = (AtlasMapRendererView) stub.inflate();
|
atlasMapRendererView = (AtlasMapRendererView) stub.inflate();
|
||||||
OsmAndMapLayersView ml = (OsmAndMapLayersView) findViewById(R.id.MapLayersView);
|
OsmAndMapLayersView ml = (OsmAndMapLayersView) findViewById(R.id.MapLayersView);
|
||||||
|
@ -230,8 +226,7 @@ public class MapActivity extends AccessibleActivity implements
|
||||||
|
|
||||||
mapActions.prepareStartOptionsMenu();
|
mapActions.prepareStartOptionsMenu();
|
||||||
|
|
||||||
mDeviceAdmin = new ComponentName(getApplicationContext(), DeviceAdminRecv.class);
|
wakeLockHelper = new WakeLockHelper(getMyApplication());
|
||||||
mDevicePolicyManager = (DevicePolicyManager) getSystemService(DEVICE_POLICY_SERVICE);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -571,11 +566,7 @@ public class MapActivity extends AccessibleActivity implements
|
||||||
@Override
|
@Override
|
||||||
protected void onStart() {
|
protected void onStart() {
|
||||||
super.onStart();
|
super.onStart();
|
||||||
active = true;
|
wakeLockHelper.onStart(this);
|
||||||
if (wakeLock == null) {
|
|
||||||
VoiceRouter voiceRouter = app.getRoutingHelper().getVoiceRouter();
|
|
||||||
voiceRouter.removeVoiceMessageListener(this);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void setProgressDlg(Dialog progressDlg) {
|
protected void setProgressDlg(Dialog progressDlg) {
|
||||||
|
@ -598,11 +589,7 @@ public class MapActivity extends AccessibleActivity implements
|
||||||
progressDlg.dismiss();
|
progressDlg.dismiss();
|
||||||
progressDlg = null;
|
progressDlg = null;
|
||||||
}
|
}
|
||||||
if (!isFinishing() && (settings.WAKE_ON_VOICE_INT.get() > 0)) {
|
wakeLockHelper.onStop(this);
|
||||||
VoiceRouter voiceRouter = app.getRoutingHelper().getVoiceRouter();
|
|
||||||
voiceRouter.addVoiceMessageListener(this);
|
|
||||||
}
|
|
||||||
active = false;
|
|
||||||
super.onStop();
|
super.onStop();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -671,16 +658,7 @@ public class MapActivity extends AccessibleActivity implements
|
||||||
|
|
||||||
public void updateApplicationModeSettings() {
|
public void updateApplicationModeSettings() {
|
||||||
changeKeyguardFlags();
|
changeKeyguardFlags();
|
||||||
// update vector renderer
|
updateMapSettings();
|
||||||
RendererRegistry registry = app.getRendererRegistry();
|
|
||||||
RenderingRulesStorage newRenderer = registry.getRenderer(settings.RENDERER.get());
|
|
||||||
if (newRenderer == null) {
|
|
||||||
newRenderer = registry.defaultRender();
|
|
||||||
}
|
|
||||||
if (registry.getCurrentSelectedRenderer() != newRenderer) {
|
|
||||||
registry.setCurrentSelectedRender(newRenderer);
|
|
||||||
app.getResourceManager().getRenderer().clearCache();
|
|
||||||
}
|
|
||||||
mapViewTrackingUtilities.updateSettings();
|
mapViewTrackingUtilities.updateSettings();
|
||||||
app.getRoutingHelper().setAppMode(settings.getApplicationMode());
|
app.getRoutingHelper().setAppMode(settings.getApplicationMode());
|
||||||
if (mapLayers.getMapInfoLayer() != null) {
|
if (mapLayers.getMapInfoLayer() != null) {
|
||||||
|
@ -698,6 +676,22 @@ public class MapActivity extends AccessibleActivity implements
|
||||||
getMapView().refreshMap(true);
|
getMapView().refreshMap(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void updateMapSettings() {
|
||||||
|
// update vector renderer
|
||||||
|
RendererRegistry registry = app.getRendererRegistry();
|
||||||
|
RenderingRulesStorage newRenderer = registry.getRenderer(settings.RENDERER.get());
|
||||||
|
if (newRenderer == null) {
|
||||||
|
newRenderer = registry.defaultRender();
|
||||||
|
}
|
||||||
|
if(mapView.getMapRenderer() != null) {
|
||||||
|
NativeCoreContext.getMapRendererContext().updateMapSettings();
|
||||||
|
}
|
||||||
|
if (registry.getCurrentSelectedRenderer() != newRenderer) {
|
||||||
|
registry.setCurrentSelectedRender(newRenderer);
|
||||||
|
app.getResourceManager().getRenderer().clearCache();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onKeyUp(int keyCode, KeyEvent event) {
|
public boolean onKeyUp(int keyCode, KeyEvent event) {
|
||||||
|
@ -825,54 +819,5 @@ public class MapActivity extends AccessibleActivity implements
|
||||||
return getWindow().getDecorView().findViewById(android.R.id.content);
|
return getWindow().getDecorView().findViewById(android.R.id.content);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onVoiceMessage() {
|
|
||||||
final Integer screenPowerSave = settings.WAKE_ON_VOICE_INT.get();
|
|
||||||
if (screenPowerSave > 0) {
|
|
||||||
uiHandler.removeCallbacks(releaseWakeLocksRunnable);
|
|
||||||
|
|
||||||
if (!active && wakeLock == null) {
|
|
||||||
PowerManager pm = (PowerManager) getSystemService(POWER_SERVICE);
|
|
||||||
wakeLock = pm.newWakeLock(PowerManager.SCREEN_BRIGHT_WAKE_LOCK
|
|
||||||
| PowerManager.ACQUIRE_CAUSES_WAKEUP,
|
|
||||||
"OsmAndOnVoiceWakeupTag");
|
|
||||||
wakeLock.acquire();
|
|
||||||
}
|
|
||||||
|
|
||||||
uiHandler.postDelayed(releaseWakeLocksRunnable,
|
|
||||||
screenPowerSave * 1000L);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void releaseWakeLocks() {
|
|
||||||
if (wakeLock != null) {
|
|
||||||
wakeLock.release();
|
|
||||||
wakeLock = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (mDevicePolicyManager != null && mDeviceAdmin != null) {
|
|
||||||
final Integer screenPowerSave = settings.WAKE_ON_VOICE_INT.get();
|
|
||||||
if (screenPowerSave > 0 && settings.MAP_ACTIVITY_ENABLED.get()) {
|
|
||||||
if (mDevicePolicyManager.isAdminActive(mDeviceAdmin)) {
|
|
||||||
try {
|
|
||||||
mDevicePolicyManager.lockNow();
|
|
||||||
} catch (SecurityException e) {
|
|
||||||
// Log.d(TAG,
|
|
||||||
// "SecurityException: No device admin permission to lock the screen!");
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// Log.d(TAG,
|
|
||||||
// "No device admin permission to lock the screen!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private class ReleaseWakeLocksRunnable implements Runnable {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
releaseWakeLocks();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,8 +59,6 @@ import android.widget.Toast;
|
||||||
*/
|
*/
|
||||||
public class MapActivityLayers {
|
public class MapActivityLayers {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private final MapActivity activity;
|
private final MapActivity activity;
|
||||||
|
|
||||||
// the order of layer should be preserved ! when you are inserting new layer
|
// the order of layer should be preserved ! when you are inserting new layer
|
||||||
|
|
|
@ -24,7 +24,6 @@ import net.osmand.plus.Version;
|
||||||
import net.osmand.plus.base.SuggestExternalDirectoryDialog;
|
import net.osmand.plus.base.SuggestExternalDirectoryDialog;
|
||||||
import net.osmand.plus.download.DownloadActivity;
|
import net.osmand.plus.download.DownloadActivity;
|
||||||
import net.osmand.plus.download.DownloadActivityType;
|
import net.osmand.plus.download.DownloadActivityType;
|
||||||
import net.osmand.plus.download.DownloadIndexFragment;
|
|
||||||
import net.osmand.plus.helpers.FileNameTranslationHelper;
|
import net.osmand.plus.helpers.FileNameTranslationHelper;
|
||||||
import net.osmand.plus.render.NativeOsmandLibrary;
|
import net.osmand.plus.render.NativeOsmandLibrary;
|
||||||
import net.osmand.plus.voice.CommandPlayer;
|
import net.osmand.plus.voice.CommandPlayer;
|
||||||
|
@ -331,6 +330,9 @@ public class SettingsGeneralActivity extends SettingsBaseActivity {
|
||||||
}
|
}
|
||||||
misc.addPreference(nativeCheckbox);
|
misc.addPreference(nativeCheckbox);
|
||||||
|
|
||||||
|
final CheckBoxPreference openGlRender = createCheckBoxPreference(settings.USE_OPENGL_RENDER, R.string.use_opengl_render,R.string.use_opengl_render_descr);
|
||||||
|
misc.addPreference(openGlRender);
|
||||||
|
|
||||||
int nav = getResources().getConfiguration().navigation;
|
int nav = getResources().getConfiguration().navigation;
|
||||||
if (nav == Configuration.NAVIGATION_DPAD || nav == Configuration.NAVIGATION_TRACKBALL ||
|
if (nav == Configuration.NAVIGATION_DPAD || nav == Configuration.NAVIGATION_TRACKBALL ||
|
||||||
nav == Configuration.NAVIGATION_WHEEL ||
|
nav == Configuration.NAVIGATION_WHEEL ||
|
||||||
|
|
|
@ -11,4 +11,5 @@ public class DashBaseFragment extends SherlockFragment {
|
||||||
public OsmandApplication getMyApplication(){
|
public OsmandApplication getMyApplication(){
|
||||||
return (OsmandApplication) getActivity().getApplication();
|
return (OsmandApplication) getActivity().getApplication();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,8 +41,6 @@ public class SettingsDevelopmentActivity extends SettingsBaseActivity {
|
||||||
|
|
||||||
cat.addPreference(createCheckBoxPreference(settings.USE_MAGNETIC_FIELD_SENSOR_COMPASS, R.string.use_magnetic_sensor, R.string.use_magnetic_sensor_descr));
|
cat.addPreference(createCheckBoxPreference(settings.USE_MAGNETIC_FIELD_SENSOR_COMPASS, R.string.use_magnetic_sensor, R.string.use_magnetic_sensor_descr));
|
||||||
|
|
||||||
cat.addPreference(createCheckBoxPreference(settings.USE_NATIVE_RENDER, R.string.use_native_render,R.string.use_native_render_descr));
|
|
||||||
|
|
||||||
Preference pref = new Preference(this);
|
Preference pref = new Preference(this);
|
||||||
pref.setTitle(R.string.test_voice_prompts);
|
pref.setTitle(R.string.test_voice_prompts);
|
||||||
pref.setSummary(R.string.play_commands_of_currently_selected_voice);
|
pref.setSummary(R.string.play_commands_of_currently_selected_voice);
|
||||||
|
|
|
@ -166,6 +166,7 @@ public class ConfigureMapMenu {
|
||||||
|
|
||||||
protected void refreshMapComplete(final MapActivity activity) {
|
protected void refreshMapComplete(final MapActivity activity) {
|
||||||
activity.getMyApplication().getResourceManager().getRenderer().clearCache();
|
activity.getMyApplication().getResourceManager().getRenderer().clearCache();
|
||||||
|
activity.updateMapSettings();
|
||||||
activity.getMapView().refreshMap(true);
|
activity.getMapView().refreshMap(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -368,8 +369,7 @@ public class ConfigureMapMenu {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
pref.set(p.getPossibleValues()[which]);
|
pref.set(p.getPossibleValues()[which]);
|
||||||
app.getResourceManager().getRenderer().clearCache();
|
refreshMapComplete(activity);
|
||||||
view.refreshMap(true);
|
|
||||||
adapter.setItemDescription(pos, SettingsActivity.getStringPropertyValue(activity, pref.get()));
|
adapter.setItemDescription(pos, SettingsActivity.getStringPropertyValue(activity, pref.get()));
|
||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
ad.notifyDataSetInvalidated();
|
ad.notifyDataSetInvalidated();
|
||||||
|
|
103
OsmAnd/src/net/osmand/plus/helpers/WakeLockHelper.java
Executable file
103
OsmAnd/src/net/osmand/plus/helpers/WakeLockHelper.java
Executable file
|
@ -0,0 +1,103 @@
|
||||||
|
package net.osmand.plus.helpers;
|
||||||
|
|
||||||
|
import net.osmand.plus.DeviceAdminRecv;
|
||||||
|
import net.osmand.plus.OsmandApplication;
|
||||||
|
import net.osmand.plus.OsmandSettings;
|
||||||
|
import net.osmand.plus.routing.VoiceRouter;
|
||||||
|
import android.annotation.SuppressLint;
|
||||||
|
import android.app.Activity;
|
||||||
|
import android.app.admin.DevicePolicyManager;
|
||||||
|
import android.content.ComponentName;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.os.Handler;
|
||||||
|
import android.os.PowerManager;
|
||||||
|
|
||||||
|
@SuppressLint("NewApi")
|
||||||
|
public class WakeLockHelper implements VoiceRouter.VoiceMessageListener {
|
||||||
|
|
||||||
|
private PowerManager.WakeLock wakeLock = null;
|
||||||
|
private ReleaseWakeLocksRunnable releaseWakeLocksRunnable = new ReleaseWakeLocksRunnable();
|
||||||
|
private DevicePolicyManager mDevicePolicyManager;
|
||||||
|
private ComponentName mDeviceAdmin;
|
||||||
|
private Handler uiHandler;
|
||||||
|
private OsmandApplication app;
|
||||||
|
private boolean active;
|
||||||
|
|
||||||
|
public WakeLockHelper(OsmandApplication app){
|
||||||
|
uiHandler = new Handler();
|
||||||
|
this.app = app;
|
||||||
|
mDeviceAdmin = new ComponentName(app, DeviceAdminRecv.class);
|
||||||
|
mDevicePolicyManager = (DevicePolicyManager) app.getSystemService(Context.DEVICE_POLICY_SERVICE);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void releaseWakeLocks() {
|
||||||
|
if (wakeLock != null) {
|
||||||
|
wakeLock.release();
|
||||||
|
wakeLock = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mDevicePolicyManager != null && mDeviceAdmin != null) {
|
||||||
|
OsmandSettings settings = app.getSettings();
|
||||||
|
final Integer screenPowerSave = settings.WAKE_ON_VOICE_INT.get();
|
||||||
|
if (screenPowerSave > 0 && settings.MAP_ACTIVITY_ENABLED.get()) {
|
||||||
|
if (mDevicePolicyManager.isAdminActive(mDeviceAdmin)) {
|
||||||
|
try {
|
||||||
|
mDevicePolicyManager.lockNow();
|
||||||
|
} catch (SecurityException e) {
|
||||||
|
// Log.d(TAG,
|
||||||
|
// "SecurityException: No device admin permission to lock the screen!");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// Log.d(TAG,
|
||||||
|
// "No device admin permission to lock the screen!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private class ReleaseWakeLocksRunnable implements Runnable {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
releaseWakeLocks();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onStart(Activity a) {
|
||||||
|
this.active = true;
|
||||||
|
if (wakeLock == null) {
|
||||||
|
VoiceRouter voiceRouter = app.getRoutingHelper().getVoiceRouter();
|
||||||
|
voiceRouter.removeVoiceMessageListener(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onStop(Activity a) {
|
||||||
|
this.active = false;
|
||||||
|
OsmandSettings settings = app.getSettings();
|
||||||
|
if (!a.isFinishing() && (settings.WAKE_ON_VOICE_INT.get() > 0)) {
|
||||||
|
VoiceRouter voiceRouter = app.getRoutingHelper().getVoiceRouter();
|
||||||
|
voiceRouter.addVoiceMessageListener(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onVoiceMessage() {
|
||||||
|
OsmandSettings settings = app.getSettings();
|
||||||
|
final Integer screenPowerSave = settings.WAKE_ON_VOICE_INT.get();
|
||||||
|
if (screenPowerSave > 0) {
|
||||||
|
uiHandler.removeCallbacks(releaseWakeLocksRunnable);
|
||||||
|
|
||||||
|
if (!active && wakeLock == null) {
|
||||||
|
PowerManager pm = (PowerManager) app.getSystemService(Context.POWER_SERVICE);
|
||||||
|
wakeLock = pm.newWakeLock(PowerManager.SCREEN_BRIGHT_WAKE_LOCK
|
||||||
|
| PowerManager.ACQUIRE_CAUSES_WAKEUP,
|
||||||
|
"OsmAndOnVoiceWakeupTag");
|
||||||
|
wakeLock.acquire();
|
||||||
|
}
|
||||||
|
|
||||||
|
uiHandler.postDelayed(releaseWakeLocksRunnable,
|
||||||
|
screenPowerSave * 1000L);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -9,11 +9,13 @@ import net.osmand.plus.resources.ResourceManager;
|
||||||
import net.osmand.plus.views.BaseMapLayer;
|
import net.osmand.plus.views.BaseMapLayer;
|
||||||
import net.osmand.plus.views.MapTileLayer;
|
import net.osmand.plus.views.MapTileLayer;
|
||||||
import net.osmand.plus.views.OsmandMapTileView;
|
import net.osmand.plus.views.OsmandMapTileView;
|
||||||
|
import net.osmand.plus.views.corenative.NativeCoreContext;
|
||||||
import android.graphics.Bitmap;
|
import android.graphics.Bitmap;
|
||||||
import android.graphics.Canvas;
|
import android.graphics.Canvas;
|
||||||
import android.graphics.Paint;
|
import android.graphics.Paint;
|
||||||
import android.graphics.PointF;
|
import android.graphics.PointF;
|
||||||
import android.graphics.RectF;
|
import android.graphics.RectF;
|
||||||
|
import android.view.MotionEvent;
|
||||||
|
|
||||||
public class MapVectorLayer extends BaseMapLayer {
|
public class MapVectorLayer extends BaseMapLayer {
|
||||||
|
|
||||||
|
@ -80,6 +82,7 @@ public class MapVectorLayer extends BaseMapLayer {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPrepareBufferImage(Canvas canvas, RotatedTileBox tilesRect,
|
public void onPrepareBufferImage(Canvas canvas, RotatedTileBox tilesRect,
|
||||||
DrawSettings drawSettings) {
|
DrawSettings drawSettings) {
|
||||||
|
@ -92,6 +95,7 @@ public class MapVectorLayer extends BaseMapLayer {
|
||||||
} else {
|
} else {
|
||||||
final MapRendererView mapRenderer = view.getMapRenderer();
|
final MapRendererView mapRenderer = view.getMapRenderer();
|
||||||
if (mapRenderer != null) {
|
if (mapRenderer != null) {
|
||||||
|
NativeCoreContext.getMapRendererContext().setNightMode(drawSettings.isNightMode());
|
||||||
// opengl renderer
|
// opengl renderer
|
||||||
mapRenderer.setTarget(new PointI(tilesRect.getCenter31X(), tilesRect.getCenter31Y()));
|
mapRenderer.setTarget(new PointI(tilesRect.getCenter31X(), tilesRect.getCenter31Y()));
|
||||||
mapRenderer.setAzimuth(-tilesRect.getRotate());
|
mapRenderer.setAzimuth(-tilesRect.getRotate());
|
||||||
|
|
|
@ -1,23 +0,0 @@
|
||||||
package net.osmand.plus.render;
|
|
||||||
|
|
||||||
import net.osmand.NativeLibrary;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Created by Denis on 02.10.2014.
|
|
||||||
*/
|
|
||||||
public class NativeCppLibrary extends NativeLibrary {
|
|
||||||
|
|
||||||
public NativeCppLibrary(boolean newLibrary) {
|
|
||||||
super(newLibrary);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void loadLibrary(String name) {
|
|
||||||
try {
|
|
||||||
System.out.println("Loading " + name);
|
|
||||||
System.loadLibrary(name);
|
|
||||||
} catch( UnsatisfiedLinkError e ) {
|
|
||||||
System.err.println("Failed to load '"+name + "':" + e);
|
|
||||||
throw e;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -4,6 +4,7 @@ package net.osmand.plus.routing;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
|
||||||
import net.osmand.Location;
|
import net.osmand.Location;
|
||||||
import net.osmand.binary.RouteDataObject;
|
import net.osmand.binary.RouteDataObject;
|
||||||
|
@ -76,8 +77,7 @@ public class VoiceRouter {
|
||||||
public interface VoiceMessageListener {
|
public interface VoiceMessageListener {
|
||||||
void onVoiceMessage();
|
void onVoiceMessage();
|
||||||
}
|
}
|
||||||
private List<VoiceMessageListener> voiceMessageListeners;
|
private ConcurrentHashMap<VoiceMessageListener, Void> voiceMessageListeners;
|
||||||
private Handler handler;
|
|
||||||
|
|
||||||
public VoiceRouter(RoutingHelper router, final OsmandSettings settings, CommandPlayer player) {
|
public VoiceRouter(RoutingHelper router, final OsmandSettings settings, CommandPlayer player) {
|
||||||
this.router = router;
|
this.router = router;
|
||||||
|
@ -85,12 +85,7 @@ public class VoiceRouter {
|
||||||
this.settings = settings;
|
this.settings = settings;
|
||||||
|
|
||||||
empty = new Struct("");
|
empty = new Struct("");
|
||||||
voiceMessageListeners = new ArrayList<VoiceRouter.VoiceMessageListener>();
|
voiceMessageListeners = new ConcurrentHashMap<VoiceRouter.VoiceMessageListener, Void>();
|
||||||
Looper looper = Looper.myLooper();
|
|
||||||
if (looper == null) {
|
|
||||||
looper = Looper.getMainLooper();
|
|
||||||
}
|
|
||||||
handler = new Handler(looper);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPlayer(CommandPlayer player) {
|
public void setPlayer(CommandPlayer player) {
|
||||||
|
@ -847,46 +842,24 @@ public class VoiceRouter {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addVoiceMessageListener(VoiceMessageListener voiceMessageListener) {
|
public void addVoiceMessageListener(VoiceMessageListener voiceMessageListener) {
|
||||||
synchronized (voiceMessageListeners) {
|
voiceMessageListeners.put(voiceMessageListener, null);
|
||||||
if (!voiceMessageListeners.contains(voiceMessageListener)) {
|
|
||||||
voiceMessageListeners.add(voiceMessageListener);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void removeVoiceMessageListener(VoiceMessageListener voiceMessageListener) {
|
public void removeVoiceMessageListener(VoiceMessageListener voiceMessageListener) {
|
||||||
synchronized (voiceMessageListeners) {
|
|
||||||
if (voiceMessageListeners.contains(voiceMessageListener)) {
|
|
||||||
voiceMessageListeners.remove(voiceMessageListener);
|
voiceMessageListeners.remove(voiceMessageListener);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void notifyOnVoiceMessage() {
|
public void notifyOnVoiceMessage() {
|
||||||
handler.post(new Runnable() {
|
if (settings.WAKE_ON_VOICE_INT.get() > 0) {
|
||||||
|
router.getApplication().runInUIThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
synchronized (voiceMessageListeners) {
|
for (VoiceMessageListener lnt : voiceMessageListeners
|
||||||
for (final VoiceMessageListener voiceMessageListener : voiceMessageListeners) {
|
.keySet()) {
|
||||||
Runnable closure = new Runnable() {
|
lnt.onVoiceMessage();
|
||||||
public void run() {
|
|
||||||
if (settings.WAKE_ON_VOICE_INT.get() > 0) {
|
|
||||||
synchronized (voiceMessageListeners) {
|
|
||||||
if (voiceMessageListeners
|
|
||||||
.contains(voiceMessageListener)
|
|
||||||
&& (settings.WAKE_ON_VOICE_INT.get() > 0)) {
|
|
||||||
voiceMessageListener
|
|
||||||
.onVoiceMessage();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
handler.post(closure);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package net.osmand.plus.views;
|
package net.osmand.plus.views;
|
||||||
|
|
||||||
import net.osmand.PlatformUtil;
|
import net.osmand.PlatformUtil;
|
||||||
|
import net.osmand.core.android.MapRendererView;
|
||||||
import net.osmand.data.RotatedTileBox;
|
import net.osmand.data.RotatedTileBox;
|
||||||
import net.osmand.util.MapUtils;
|
import net.osmand.util.MapUtils;
|
||||||
|
|
||||||
|
@ -8,6 +9,7 @@ import org.apache.commons.logging.Log;
|
||||||
|
|
||||||
import android.os.SystemClock;
|
import android.os.SystemClock;
|
||||||
import android.util.FloatMath;
|
import android.util.FloatMath;
|
||||||
|
import android.view.MotionEvent;
|
||||||
import android.view.animation.AccelerateDecelerateInterpolator;
|
import android.view.animation.AccelerateDecelerateInterpolator;
|
||||||
import android.view.animation.DecelerateInterpolator;
|
import android.view.animation.DecelerateInterpolator;
|
||||||
import android.view.animation.LinearInterpolator;
|
import android.view.animation.LinearInterpolator;
|
||||||
|
@ -104,9 +106,11 @@ public class AnimateDraggingMapThread {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
try {
|
try {
|
||||||
|
suspendUpdate();
|
||||||
runnable.run();
|
runnable.run();
|
||||||
} finally {
|
} finally {
|
||||||
currentThread = null;
|
currentThread = null;
|
||||||
|
resumeUpdate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, "Animating Thread");
|
}, "Animating Thread");
|
||||||
|
@ -305,6 +309,20 @@ public class AnimateDraggingMapThread {
|
||||||
targetZoomScale = 0;
|
targetZoomScale = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void suspendUpdate() {
|
||||||
|
final MapRendererView mapRenderer = tileView.getMapRenderer();
|
||||||
|
if (mapRenderer != null) {
|
||||||
|
mapRenderer.suspendSymbolsUpdate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void resumeUpdate() {
|
||||||
|
final MapRendererView mapRenderer = tileView.getMapRenderer();
|
||||||
|
if (mapRenderer != null) {
|
||||||
|
mapRenderer.resumeSymbolsUpdate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void setTargetValues(int zoom, double zoomScale, double lat, double lon){
|
private void setTargetValues(int zoom, double zoomScale, double lat, double lon){
|
||||||
targetIntZoom = zoom;
|
targetIntZoom = zoom;
|
||||||
targetZoomScale = zoomScale;
|
targetZoomScale = zoomScale;
|
||||||
|
|
|
@ -719,6 +719,14 @@ public class OsmandMapTileView implements IMapDownloaderCallback {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean onTouchEvent(MotionEvent event) {
|
public boolean onTouchEvent(MotionEvent event) {
|
||||||
|
if (mapRenderer != null) {
|
||||||
|
if (event.getAction() == MotionEvent.ACTION_DOWN) {
|
||||||
|
mapRenderer.suspendSymbolsUpdate();
|
||||||
|
} else if (event.getAction() == MotionEvent.ACTION_UP
|
||||||
|
|| event.getAction() == MotionEvent.ACTION_CANCEL) {
|
||||||
|
mapRenderer.resumeSymbolsUpdate();
|
||||||
|
}
|
||||||
|
}
|
||||||
if (twoFingerTapDetector.onTouchEvent(event)) {
|
if (twoFingerTapDetector.onTouchEvent(event)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,7 @@ import android.content.Context;
|
||||||
import android.util.DisplayMetrics;
|
import android.util.DisplayMetrics;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.WindowManager;
|
import android.view.WindowManager;
|
||||||
|
import net.osmand.IndexConstants;
|
||||||
import net.osmand.core.android.CoreResourcesFromAndroidAssetsCustom;
|
import net.osmand.core.android.CoreResourcesFromAndroidAssetsCustom;
|
||||||
import net.osmand.core.android.MapRendererContext;
|
import net.osmand.core.android.MapRendererContext;
|
||||||
import net.osmand.core.android.NativeCore;
|
import net.osmand.core.android.NativeCore;
|
||||||
|
@ -23,6 +24,8 @@ public class NativeCoreContext {
|
||||||
|
|
||||||
private static boolean init;
|
private static boolean init;
|
||||||
|
|
||||||
|
private static MapRendererContext mapRendererContext;
|
||||||
|
|
||||||
public static boolean isInit() {
|
public static boolean isInit() {
|
||||||
return init;
|
return init;
|
||||||
}
|
}
|
||||||
|
@ -52,42 +55,42 @@ public class NativeCoreContext {
|
||||||
WindowManager mgr = (WindowManager)app.getSystemService(Context.WINDOW_SERVICE);
|
WindowManager mgr = (WindowManager)app.getSystemService(Context.WINDOW_SERVICE);
|
||||||
DisplayMetrics dm = new DisplayMetrics();
|
DisplayMetrics dm = new DisplayMetrics();
|
||||||
mgr.getDefaultDisplay().getMetrics(dm);
|
mgr.getDefaultDisplay().getMetrics(dm);
|
||||||
|
float density = Math.max(0, dm.density - 1);
|
||||||
|
|
||||||
// Get device display density factor
|
ObfsCollection obfsCollection = new ObfsCollection();
|
||||||
// DisplayMetrics displayMetrics = new DisplayMetrics();
|
obfsCollection.addDirectory(directory.getAbsolutePath(), false);
|
||||||
// act.getWindowManager().getDefaultDisplay().getMetrics(displayMetrics);
|
|
||||||
DisplayMetrics displayMetrics = app.getResources().getDisplayMetrics();
|
|
||||||
// TODO getSettings().getSettingsZoomScale() + Math.sqrt(Math.max(0, getDensity() - 1))
|
|
||||||
float scaleCoefficient = displayMetrics.density;
|
|
||||||
if (Math.min(dm.widthPixels / (dm.density * 160), dm.heightPixels / (dm.density * 160)) > 2.5f) {
|
|
||||||
// large screen
|
|
||||||
scaleCoefficient *= 1.5f;
|
|
||||||
}
|
|
||||||
float displayDensityFactor = scaleCoefficient;
|
|
||||||
|
|
||||||
_obfsCollection = new ObfsCollection();
|
|
||||||
_obfsCollection.addDirectory(directory.getAbsolutePath(), false);
|
|
||||||
|
|
||||||
_mapStylesCollection = new MapStylesCollection();
|
|
||||||
|
|
||||||
_mapRendererContext = new MapRendererContext();
|
|
||||||
_mapRendererContext.setDisplayDensityFactor(displayDensityFactor);
|
|
||||||
_mapRendererContext.setupObfMap(
|
|
||||||
_mapStylesCollection.getResolvedStyleByName("default"),
|
|
||||||
_obfsCollection);
|
|
||||||
|
|
||||||
|
MapStylesCollection mapStylesCollection = setupMapStyleCollection(app);
|
||||||
|
mapRendererContext = new MapRendererContext(app, density);
|
||||||
|
mapRendererContext.setupObfMap(mapStylesCollection, obfsCollection);
|
||||||
init = true;
|
init = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static MapStylesCollection _mapStylesCollection;
|
private static MapStylesCollection setupMapStyleCollection(
|
||||||
|
OsmandApplication app) {
|
||||||
|
MapStylesCollection mapStylesCollection = new MapStylesCollection();
|
||||||
|
// Alexey TODO
|
||||||
|
// internalRenderers.put("Touring-view_(more-contrast-and-details)", "Touring-view_(more-contrast-and-details)" +".render.xml");
|
||||||
|
// internalRenderers.put("UniRS", "UniRS" + ".render.xml");
|
||||||
|
// internalRenderers.put("LightRS", "LightRS" + ".render.xml");
|
||||||
|
// internalRenderers.put("High-contrast-roads", "High-contrast-roads" + ".render.xml");
|
||||||
|
// internalRenderers.put("Winter-and-ski", "Winter-and-ski" + ".render.xml");
|
||||||
|
File renderers = app.getAppPath(IndexConstants.RENDERERS_DIR);
|
||||||
|
File[] lf = renderers.listFiles();
|
||||||
|
if(lf != null) {
|
||||||
|
for(File f : lf) {
|
||||||
|
if(f.getName().endsWith(IndexConstants.RENDERER_INDEX_EXT)) {
|
||||||
|
mapStylesCollection.addStyleFromFile(f.getAbsolutePath());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return mapStylesCollection;
|
||||||
|
}
|
||||||
|
|
||||||
private static ObfsCollection _obfsCollection;
|
|
||||||
|
|
||||||
private static MapRendererContext _mapRendererContext;
|
|
||||||
|
|
||||||
public static MapRendererContext getMapRendererContext() {
|
public static MapRendererContext getMapRendererContext() {
|
||||||
return _mapRendererContext;
|
return mapRendererContext;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue