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

This commit is contained in:
Victor Shcherb 2015-10-25 22:23:52 +01:00
commit 391d5e194f
26 changed files with 394 additions and 174 deletions

View file

@ -1409,4 +1409,22 @@
<string name="poi_tomb_rock_cut">Tipus: excavació a la roca</string> <string name="poi_tomb_rock_cut">Tipus: excavació a la roca</string>
<string name="poi_tomb_hypogeum">Tipus: subterrani</string> <string name="poi_tomb_hypogeum">Tipus: subterrani</string>
<string name="poi_tomb_vault">Tipus: volta</string> <string name="poi_tomb_vault">Tipus: volta</string>
<string name="poi_trees_nectorine">Nectariner</string>
<string name="poi_trees_mango">Mango</string>
<string name="poi_trees_date">Data</string>
<string name="poi_trees_coffea">Café</string>
<string name="poi_animal_shelter">Refugi d\'animals</string>
<string name="poi_covered_yes">Cobert</string>
<string name="poi_covered_no">Descobert</string>
<string name="poi_smoking_no">Prohibit fumar</string>
<string name="poi_smoking_outside">Només es permet fumar a l\'exterior</string>
<string name="poi_smoking_yes">Es permet fumar</string>
<string name="poi_smoking_separated">Es permet fumar a una sala separada</string>
<string name="poi_smoking_isolated">Es permet fumar a una sala aïllada</string>
<string name="poi_smoking_dedicated">Exclusiu per fumadors</string>
<string name="poi_toll_yes">Peatge</string>
<string name="poi_toll_no">Sense peatge</string>
<string name="poi_toll_hgv_yes">Peatge de vehicles pesants</string>
</resources> </resources>

View file

@ -32,7 +32,7 @@
<string name="continue_follow_previous_route_auto">La navegació anterior no ha estat finalitzada. Desitgeu continuar-la? (%1$s segons)</string> <string name="continue_follow_previous_route_auto">La navegació anterior no ha estat finalitzada. Desitgeu continuar-la? (%1$s segons)</string>
<string name="osmand_parking_hours">Hores</string> <string name="osmand_parking_hours">Hores</string>
<string name="osmand_parking_minutes">Minuts</string> <string name="osmand_parking_minutes">Minuts</string>
<string name="osmand_parking_position_description_add_time">El cotxe es va aparcar a:</string> <string name="osmand_parking_position_description_add_time">El cotxe es va aparcar a</string>
<string name="use_compass_navigation_descr">Usa la brúixola quan no es pugui determinar la direcció</string> <string name="use_compass_navigation_descr">Usa la brúixola quan no es pugui determinar la direcció</string>
<string name="use_compass_navigation">Usa la brúixola</string> <string name="use_compass_navigation">Usa la brúixola</string>
<string name="shared_location">Localització compartida</string> <string name="shared_location">Localització compartida</string>
@ -2164,7 +2164,7 @@ Per retornar a l\'estil habitual dels mapes d\'OsmAnd, només cal desactivar aqu
<string name="world_maps">Mapes del món</string> <string name="world_maps">Mapes del món</string>
<string name="world_regions">Regions del món</string> <string name="world_regions">Regions del món</string>
<string name="later">Mes tard</string> <string name="later">Mes tard</string>
<string name="get_full_version">Obteniu la versió completa</string> <string name="get_full_version">Versió completa</string>
<string name="downloads">Baixades</string> <string name="downloads">Baixades</string>
<string name="activate_seamarks_plugin">Activeu el connector de cartes marines</string> <string name="activate_seamarks_plugin">Activeu el connector de cartes marines</string>
<string name="activate_srtm_plugin">Activeu el connector de corbes de nivell</string> <string name="activate_srtm_plugin">Activeu el connector de corbes de nivell</string>
@ -2177,4 +2177,11 @@ Per retornar a l\'estil habitual dels mapes d\'OsmAnd, només cal desactivar aqu
<string name="update_all">Actualitzeu tot (%1$s MB)</string> <string name="update_all">Actualitzeu tot (%1$s MB)</string>
<string name="free_downloads_used">Baixades gratuïtes realitzades</string> <string name="free_downloads_used">Baixades gratuïtes realitzades</string>
<string name="free_downloads_used_description">Podeu veure quantes baixades gratuïtes heu fet</string> <string name="free_downloads_used_description">Podeu veure quantes baixades gratuïtes heu fet</string>
<string name="simulate_initial_startup_descr">Restaura el senyalitzador de primera engegada, mantenint altres paràmetres en l\'estat original</string>
<string name="simulate_initial_startup">Simula engegada inicial</string>
<string name="share_geo">geo:</string>
<string name="share_menu_location">Comparteix la posició</string>
<string name="shared_string_send">Envia</string>
<string name="hello_blank_fragment">Hola fragment buit</string>
<string name="application_dir_description">Trieu on voleu desar els fitxers de mapes.</string>
</resources> </resources>

View file

@ -25,7 +25,7 @@
<string name="poi_baby_goods">Babyudstryr</string> <string name="poi_baby_goods">Babyudstryr</string>
<string name="poi_bag">Tasker</string> <string name="poi_bag">Tasker</string>
<string name="poi_bathroom_furnishing">Badeværelsesinventar</string> <string name="poi_bathroom_furnishing">Badeværelsesinventar</string>
<string name="poi_bed">Soveværelsesmøbler</string> <string name="poi_bed">sengetøjsbutik</string>
<string name="poi_boutique">Modebutik</string> <string name="poi_boutique">Modebutik</string>
<string name="poi_carpet">Tæpper</string> <string name="poi_carpet">Tæpper</string>
<string name="poi_chemist">Materialist</string> <string name="poi_chemist">Materialist</string>
@ -2304,7 +2304,7 @@
<string name="poi_historic_period_archaic_greece">Historiskperiode: Arkaisk tid</string> <string name="poi_historic_period_archaic_greece">Historiskperiode: Arkaisk tid</string>
<string name="poi_historic_period_iron_age">Historiskperiode: Jernalderen</string> <string name="poi_historic_period_iron_age">Historiskperiode: Jernalderen</string>
<string name="poi_historic_period_roman_republic">Historiskperiode: Romerske republik (508 f.kr. - 27 f.kr.)</string> <string name="poi_historic_period_roman_republic">Historiskperiode: Romerske republik (508 f.kr. - 27 f.kr.)</string>
<string name="poi_historic_period_hellenistic_greece">Historiskperiode: hellenistisk Grækenland</string> <string name="poi_historic_period_hellenistic_greece">Historiskperiode: Hellenistisk Grækenland</string>
<string name="poi_historic_period_new_kingdom">Historiskperiode: nye Kongerige (1550-1069 f.kr.)</string> <string name="poi_historic_period_new_kingdom">Historiskperiode: nye Kongerige (1550-1069 f.kr.)</string>
<string name="poi_historic_period_middle_kingdom">Historiskperiode: mellemste rige (2055 -1650 f.kr.)</string> <string name="poi_historic_period_middle_kingdom">Historiskperiode: mellemste rige (2055 -1650 f.kr.)</string>
<string name="poi_historic_period_predynastic_egypt">Historiskperiode: prædynastiske Egypten</string> <string name="poi_historic_period_predynastic_egypt">Historiskperiode: prædynastiske Egypten</string>
@ -2314,7 +2314,7 @@
<string name="poi_historic_period_second_intermediate_period">Historiskperiode: anden mellemliggende periode (1650 1550 f.Kr.)</string> <string name="poi_historic_period_second_intermediate_period">Historiskperiode: anden mellemliggende periode (1650 1550 f.Kr.)</string>
<string name="poi_historic_period_third_intermediate_period">"Historiskperiode: tredje mellemliggende periode (1069 - 664 f.Kr.) "</string> <string name="poi_historic_period_third_intermediate_period">"Historiskperiode: tredje mellemliggende periode (1069 - 664 f.Kr.) "</string>
<string name="poi_historic_period_first_persian_period">Historiskperiode: første persiske periode</string> <string name="poi_historic_period_first_persian_period">Historiskperiode: første persiske periode</string>
<string name="poi_historic_period_late_period">Historiskperiode: sene periode (664 -332 f.Kr.)</string> <string name="poi_historic_period_late_period">Historiskperiode: sene periode (664 - 332 f.Kr.)</string>
<string name="poi_historic_period_second_persian_period">Historiskperiode: anden Persiske periode</string> <string name="poi_historic_period_second_persian_period">Historiskperiode: anden Persiske periode</string>
<string name="poi_historic_period_alexander_the_great">Historiskperiode: Alexander den Store</string> <string name="poi_historic_period_alexander_the_great">Historiskperiode: Alexander den Store</string>
<string name="poi_historic_period_ptolemaic_egypt">Historiskperiode: ptolemæiske Egypten (305 f.kr. 30 f.kr.)</string> <string name="poi_historic_period_ptolemaic_egypt">Historiskperiode: ptolemæiske Egypten (305 f.kr. 30 f.kr.)</string>
@ -2325,9 +2325,63 @@
<string name="poi_historic_period_roman_greece">Historiskperiode: romersk græsk (146 f.Kr. 330 e.Kr)</string> <string name="poi_historic_period_roman_greece">Historiskperiode: romersk græsk (146 f.Kr. 330 e.Kr)</string>
<string name="poi_historic_period_roman_kingdom">Historiskperiode: det romerske Kongerige (753 f.Kr. 509 f.Kr.)</string> <string name="poi_historic_period_roman_kingdom">Historiskperiode: det romerske Kongerige (753 f.Kr. 509 f.Kr.)</string>
<string name="poi_historic_period_dominate">Historiskperiode: Dominatet (285 e.Kr. 476 e.Kr)</string> <string name="poi_historic_period_dominate">Historiskperiode: Dominatet (285 e.Kr. 476 e.Kr)</string>
<string name="poi_historic_period_villager">Historiskperiode: landsbybeboer (epoke I, II, 1580 f.Kr. - 133 e.Kr.)</string> <string name="poi_historic_period_villager">Historiskperiode: landsbyboere (epoke I, II, 1580 f.Kr. - 133 e.Kr.)</string>
<string name="poi_historic_period_urban">Historiskperiode: urban (epoke III, 133 e.Kr. - 374 e.Kr.)</string> <string name="poi_historic_period_urban">Historiskperiode: bymæssig (epoke III, 133 e.Kr. - 374 e.Kr.)</string>
<string name="poi_historic_period_classical">Historiskperiode: klassisk (epoke IV, 374 e.Kr. - 900 e.Kr.)</string> <string name="poi_historic_period_classical">Historiskperiode: klassisk (epoke IV, 374 e.Kr. - 900 e.Kr.)</string>
<string name="poi_historic_period_imperial">Historiskperiode: imperial (epoke V, 900 e.Kr. - 1200 e.Kr.)</string> <string name="poi_historic_period_imperial">Historiskperiode: imperial (epoke V, 900 e.Kr. - 1200 e.Kr.)</string>
<string name="poi_tourism_yes">Turistmæssige objekt</string>
<string name="poi_historic_era_paleolithic">Historisk æra: Palæolitisk (2,6 millioner år-10000 BP)</string>
<string name="poi_historic_era_mesolithic">Historisk æra: Mesolitikum</string>
<string name="poi_historic_era_neolithic">Historisk æra: neolitiske</string>
<string name="poi_historic_era_chalcolithic">Historisk æra: kalkolitiske (IV-III årtusinde f.Kr.)</string>
<string name="poi_historic_stone">Historisk sten</string>
<string name="poi_stone_type_conciliation_cross">Type: forlig cross</string>
<string name="poi_stone_type_coat_of_arms">Type: coat of arms</string>
<string name="poi_material_wood">Materiale: træ</string>
<string name="poi_material_metal">Materiale: metal</string>
<string name="poi_material_reinforced_concrete">Materiale: armeret beton</string>
<string name="poi_material_concrete">Materiale: beton</string>
<string name="poi_material_steel">Materiale: stål</string>
<string name="poi_material_stone">Materiale: sten</string>
<string name="poi_material_masonry">Materiale: murværk</string>
<string name="poi_material_brick">Materiale: mursten</string>
<string name="poi_material_plastic">Materiale: plastik</string>
<string name="poi_material_sandstone">Materiale: sandsten</string>
<string name="poi_material_granite_stone">Materiale: granitsten</string>
<string name="poi_material_metal_wood">Materiale: metal, træ</string>
<string name="poi_material_glass">Materiale: glas</string>
<string name="poi_material_bronze">Materiale: bronze</string>
<string name="poi_material_earth">Materiale: jord</string>
<string name="poi_material_composite">Materiale: composit</string>
<string name="poi_material_limestone">Materiale: kalksten</string>
<string name="poi_material_marble">Materiale: marmor</string>
<string name="poi_material_aluminium">Materiale: aluminium</string>
<string name="poi_site_type_megalith">Type: megalith</string>
<string name="poi_site_type_tumulus">Type: gravhøj</string>
<string name="poi_site_type_fortification">Type: befæstning</string>
<string name="poi_site_type_settlement">Type: afregning</string>
<string name="poi_site_type_city">Type: by</string>
<string name="poi_site_type_hut_circle">Type: hyttecirkel</string>
<string name="poi_site_type_necropolis">Type: necropolis</string>
<string name="poi_site_type_petroglyph">Type: petroglyph</string>
<string name="poi_site_type_earthwork">Type: jordvold</string>
<string name="poi_megalith_type_menhir">Megalith type: bautasten</string>
<string name="poi_megalith_type_dolmen">Megalith type: dolmen</string>
<string name="poi_megalith_type_nuraghe">Megalith type: nuraghe</string>
<string name="poi_megalith_type_stone_circle">Megalith type: sten cirkel</string>
<string name="poi_megalith_type_passage_grave">Megalith type: jættestue</string>
<string name="poi_fortification_type_hill_fort">Befæstning type: hill fort</string>
<string name="poi_fortification_type_limes">Befæstning type: kalk</string>
<string name="poi_fortification_type_sconce">Befæstning type: sconce</string>
<string name="poi_fortification_type_ring_ditch">Befæstning type: ring grøft</string>
<string name="poi_pa">Pa (maori befæstet bosættelse)</string>
<string name="poi_historic_farm">Historisk gård</string>
<string name="poi_historic_railway_station">Historisk jernbanestation</string>
</resources> </resources>

View file

@ -91,7 +91,7 @@
<string name="route_updated_loc_found">Rute blir beregnet når posisjon blir funnet</string> <string name="route_updated_loc_found">Rute blir beregnet når posisjon blir funnet</string>
<string name="osmand_parking_hours">Timer</string> <string name="osmand_parking_hours">Timer</string>
<string name="osmand_parking_minutes">Minutter</string> <string name="osmand_parking_minutes">Minutter</string>
<string name="osmand_parking_position_description_add_time">Bilen ble parkert her:</string> <string name="osmand_parking_position_description_add_time">Bilen ble parkert</string>
<string name="rendering_attr_appMode_name">Opptegningsmodus</string> <string name="rendering_attr_appMode_name">Opptegningsmodus</string>
<string name="rendering_attr_contourLines_name">Vis koter</string> <string name="rendering_attr_contourLines_name">Vis koter</string>
<string name="rendering_attr_hmRendered_description">Øk mengden av kartdetaljer vist</string> <string name="rendering_attr_hmRendered_description">Øk mengden av kartdetaljer vist</string>

View file

@ -821,10 +821,10 @@
<string name="index_name_europe">Europa</string> <string name="index_name_europe">Europa</string>
<string name="index_name_france">Europa - Francja</string> <string name="index_name_france">Europa - Francja</string>
<string name="index_name_germany">Europa - Niemcy</string> <string name="index_name_germany">Europa - Niemcy</string>
<string name="index_name_russia">Europa/Azja - Rosja</string> <string name="index_name_russia">Rosja</string>
<string name="index_name_africa">Afryka</string> <string name="index_name_africa">Afryka</string>
<string name="index_name_asia">Azja</string> <string name="index_name_asia">Azja</string>
<string name="index_name_oceania">Oceania</string> <string name="index_name_oceania">Australia i Oceania</string>
<string name="index_name_other">Mapy świata i tematyczne</string> <string name="index_name_other">Mapy świata i tematyczne</string>
<string name="index_name_wiki">Wikipedia dla POI</string> <string name="index_name_wiki">Wikipedia dla POI</string>
<string name="index_name_voice">Komunikaty głosowe (nagrane, ograniczone możliwości)</string> <string name="index_name_voice">Komunikaty głosowe (nagrane, ograniczone możliwości)</string>
@ -2282,9 +2282,16 @@ Afganistan, Afryka Południowa, Albania, Algieria, Andora, Angola, Anguilla, Ant
<string name="activate_seamarks_plugin">Proszę aktywuj plugin latarni morskich</string> <string name="activate_seamarks_plugin">Proszę aktywuj plugin latarni morskich</string>
<string name="activate_srtm_plugin">Proszę aktywuj plugin SRTM</string> <string name="activate_srtm_plugin">Proszę aktywuj plugin SRTM</string>
<string name="later">Później</string> <string name="later">Później</string>
<string name="get_full_version">Pobierz pełną wersję</string> <string name="get_full_version">Pełna wersja</string>
<string name="downloads">Pobierz</string> <string name="downloads">Pobierz</string>
<string name="favorite_category_add_new_title">Dodaj nową kategorię</string> <string name="favorite_category_add_new_title">Dodaj nową kategorię</string>
<string name="favorite_category_name">Nazwa kategorii</string> <string name="favorite_category_name">Nazwa kategorii</string>
<string name="favorite_category_dublicate_message">Taka nazwa kategorii już istnieje. Proszę wybrać inną.</string> <string name="favorite_category_dublicate_message">Taka nazwa kategorii już istnieje. Proszę wybrać inną.</string>
<string name="share_menu_location">Udostępnij położenie</string>
<string name="shared_string_send">Wyślij</string>
<string name="file_size_in_mb">%.1f MB</string>
<string name="update_all">Uaktualnij wszystko (%1$s MB)</string>
<string name="free_downloads_used">Wykorzystano darmowe pobrania</string>
<string name="application_dir_description">Proszę wybrać położenie zapisywania plików map.</string>
<string name="value_downloaded_from_max">%1$.1f z %2$.1f MB</string>
</resources> </resources>

View file

@ -44,7 +44,7 @@
<string name="poi_copyshop">Ксерокопия, полиграфия</string> <string name="poi_copyshop">Ксерокопия, полиграфия</string>
<string name="poi_curtain">Шторы, портьеры</string> <string name="poi_curtain">Шторы, портьеры</string>
<string name="poi_fabric">Ткани</string> <string name="poi_fabric">Ткани</string>
<string name="poi_bedding">Постельное бельё</string> <!-- <string name="poi_bedding">Постельное бельё</string>-->
<string name="poi_dive">Снаряжение для дайвинга</string> <string name="poi_dive">Снаряжение для дайвинга</string>
<string name="poi_doityourself">Инструменты и стройматериалы</string> <string name="poi_doityourself">Инструменты и стройматериалы</string>
<string name="poi_doors">Двери</string> <string name="poi_doors">Двери</string>
@ -863,7 +863,7 @@
<string name="poi_residential">Жилой район</string> <string name="poi_residential">Жилой район</string>
<string name="poi_religious">Религиозное землепользование</string> <string name="poi_religious">Религиозное землепользование</string>
<string name="poi_general_tourist_attraction_yes">Достопримечательность (тип неизвестен)</string> <!-- <string name="poi_general_tourist_attraction_yes">Достопримечательность (тип неизвестен)</string>-->
<string name="poi_attraction_amusement_ride">Парк атракционов</string> <string name="poi_attraction_amusement_ride">Парк атракционов</string>
<string name="poi_wilderness_hut">Лесной домик</string> <string name="poi_wilderness_hut">Лесной домик</string>
<string name="poi_hunting_lodge">Охотничий домик</string> <string name="poi_hunting_lodge">Охотничий домик</string>
@ -2278,4 +2278,59 @@
<string name="poi_historic_period_classical">Исторический период: классический (период IV, 374 900 г. н.э.)</string> <string name="poi_historic_period_classical">Исторический период: классический (период IV, 374 900 г. н.э.)</string>
<string name="poi_historic_period_imperial">Исторический период: имперский (период V, 900 1200 г. н.э.)</string> <string name="poi_historic_period_imperial">Исторический период: имперский (период V, 900 1200 г. н.э.)</string>
<string name="poi_historic_era_paleolithic">Эра: палеолит (2.6 млн. лет до н.э. 10000 лет до н.э.)</string>
<string name="poi_historic_era_mesolithic">Эра: мезолит</string>
<string name="poi_historic_era_neolithic">Эра: неолит</string>
<string name="poi_historic_era_chalcolithic">Эра: халколит (медный век) (IV—III тысячелетия до н.э.)</string>
<string name="poi_historic_stone">Исторический камень</string>
<string name="poi_stone_type_conciliation_cross">Тип: примирительный крест</string>
<string name="poi_stone_type_coat_of_arms">Тип: герб</string>
<string name="poi_material_wood">Материал: дерево</string>
<string name="poi_material_metal">Материал: металл</string>
<string name="poi_material_reinforced_concrete">Материал: железобетон</string>
<string name="poi_material_concrete">Материал: бетон</string>
<string name="poi_material_steel">Материал: сталь</string>
<string name="poi_material_stone">Материал: камень</string>
<string name="poi_material_masonry">Материал: каменная кладка</string>
<string name="poi_material_brick">Материал: кирпич</string>
<string name="poi_material_plastic">Материал: пластик</string>
<string name="poi_material_sandstone">Материал: песчаник</string>
<string name="poi_material_granite_stone">Материал: гранит</string>
<string name="poi_material_metal_wood">Материал: металл, дерево</string>
<string name="poi_material_glass">Материал: стекло</string>
<string name="poi_material_bronze">Материал: бронза</string>
<string name="poi_material_earth">Материал: земля</string>
<string name="poi_material_composite">Материал: составной</string>
<string name="poi_material_limestone">Материал: известняк</string>
<string name="poi_material_marble">Материал: мрамор</string>
<string name="poi_material_aluminium">Материал: алюминий</string>
<string name="poi_site_type_megalith">Тип: мегалит</string>
<string name="poi_site_type_tumulus">Тип: тумулус</string>
<string name="poi_site_type_fortification">Тип: укрепление</string>
<string name="poi_site_type_settlement">Тип: поселение</string>
<string name="poi_site_type_city">Тип: город</string>
<string name="poi_site_type_hut_circle">Тип: круг из хижин</string>
<string name="poi_site_type_necropolis">Тип: некрополь</string>
<string name="poi_site_type_petroglyph">Тип: петроглиф</string>
<string name="poi_site_type_earthwork">Тип: земляное укрепление</string>
<string name="poi_megalith_type_menhir">Тип мегалита: менгир</string>
<string name="poi_megalith_type_dolmen">Тип мегалита: дольмен</string>
<string name="poi_megalith_type_nuraghe">Тип мегалита: нураги</string>
<string name="poi_megalith_type_stone_circle">Тип мегалита: каменный круг</string>
<string name="poi_megalith_type_passage_grave">Тип мегалита: коридорная гробница</string>
<string name="poi_fortification_type_hill_fort">Тип укрепления: городище</string>
<string name="poi_fortification_type_limes">Тип укрепления: лимес</string>
<string name="poi_fortification_type_sconce">Тип укрепления: шанец</string>
<string name="poi_fortification_type_ring_ditch">Тип укрепления: рондела (кольцевая канава)</string>
<string name="poi_pa">Па (укреплённое поселение маори)</string>
<string name="poi_historic_farm">Историческая ферма</string>
<string name="poi_historic_railway_station">Историческая железнодорожная станция</string>
<string name="poi_tourism_yes">Туристический объект</string>
</resources> </resources>

View file

@ -1401,4 +1401,16 @@
<string name="poi_memorial_obelisk">Obeliscu</string> <string name="poi_memorial_obelisk">Obeliscu</string>
<string name="poi_memorial_column">Colunna</string> <string name="poi_memorial_column">Colunna</string>
<string name="poi_memorial_stupa">Stupa</string> <string name="poi_memorial_stupa">Stupa</string>
<string name="poi_tomb_war_grave">Casta: campusantu de gherra</string>
<string name="poi_tomb_tumulus">Casta: tùmulu</string>
<string name="poi_tomb_rock_cut">Casta: rupestre (iscavada in sa roca)</string>
<string name="poi_tomb_hypogeum">Casta: conchedda</string>
<string name="poi_tomb_vault">Casta: tumba a bòveda</string>
<string name="poi_tomb_columbarium">Casta: columbàriu</string>
<string name="poi_tomb_mausoleum">Casta: mausoleu</string>
<string name="poi_tomb_sarcophagus">Casta: sarcòfagu</string>
<string name="poi_tomb_crypt">Casta: cripta</string>
<string name="poi_tomb_pyramid">Casta: piràmide</string>
<string name="poi_highway_steps">Iscalas</string>
</resources> </resources>

View file

@ -78,7 +78,7 @@
<string name="poi_baby_goods">Baby goods</string> <string name="poi_baby_goods">Baby goods</string>
<string name="poi_bag">Bag shop</string> <string name="poi_bag">Bag shop</string>
<string name="poi_bathroom_furnishing">Bathroom furnishings</string> <string name="poi_bathroom_furnishing">Bathroom furnishings</string>
<string name="poi_bed">Bed room furnishings</string> <string name="poi_bed">Bedding store</string>
<string name="poi_boutique">Fashion boutique</string> <string name="poi_boutique">Fashion boutique</string>
<string name="poi_camera">Cameras and lenses</string> <string name="poi_camera">Cameras and lenses</string>
<string name="poi_carpet">Carpet shop</string> <string name="poi_carpet">Carpet shop</string>
@ -92,7 +92,7 @@
<string name="poi_copyshop">Copy shop</string> <string name="poi_copyshop">Copy shop</string>
<string name="poi_curtain">Curtain shop</string> <string name="poi_curtain">Curtain shop</string>
<string name="poi_fabric">Drapery shop</string> <string name="poi_fabric">Drapery shop</string>
<string name="poi_bedding">Bedding store</string> <!-- <string name="poi_bedding">Bedding store</string>-->
<string name="poi_dive">Diving equipment</string> <string name="poi_dive">Diving equipment</string>
<string name="poi_doityourself">Home improvement store</string> <string name="poi_doityourself">Home improvement store</string>
<string name="poi_doors">Doors</string> <string name="poi_doors">Doors</string>
@ -606,8 +606,8 @@
<string name="poi_theme_park">Theme park</string> <string name="poi_theme_park">Theme park</string>
<string name="poi_attraction">Tourist attraction</string> <string name="poi_attraction">Tourist attraction</string>
<string name="poi_tourism_attraction">Tourist attraction</string> <!-- <string name="poi_tourism_attraction">Tourist attraction</string>-->
<string name="poi_general_tourist_attraction_yes">General tourist attraction</string> <string name="poi_tourism_yes">Touristic object</string>
<string name="poi_attraction_amusement_ride">Amusement ride</string> <string name="poi_attraction_amusement_ride">Amusement ride</string>
<string name="poi_attraction_animal">Animal (attraction)</string> <string name="poi_attraction_animal">Animal (attraction)</string>
<string name="poi_attraction_big_wheel">Ferris wheel</string> <string name="poi_attraction_big_wheel">Ferris wheel</string>
@ -723,7 +723,7 @@
<string name="poi_internet_access_no">Internet access: no</string> <string name="poi_internet_access_no">Internet access: no</string>
<string name="poi_monastery">Monastery</string> <string name="poi_monastery">Monastery</string>
<string name="poi_historic_monastery">Historic monastery</string> <!-- <string name="poi_historic_monastery">Historic monastery</string>-->
<string name="poi_religious">Religious area</string> <string name="poi_religious">Religious area</string>
<string name="poi_wayside_cross">Wayside cross</string> <string name="poi_wayside_cross">Wayside cross</string>
<string name="poi_wayside_shrine">Wayside shrine</string> <string name="poi_wayside_shrine">Wayside shrine</string>
@ -2284,4 +2284,57 @@
<string name="poi_historic_period_classical">Historic period: classical (epoch IV, 374 AC 900 AC)</string> <string name="poi_historic_period_classical">Historic period: classical (epoch IV, 374 AC 900 AC)</string>
<string name="poi_historic_period_imperial">Historic period: imperial (epoch V, 900 AC 1200 AC)</string> <string name="poi_historic_period_imperial">Historic period: imperial (epoch V, 900 AC 1200 AC)</string>
<string name="poi_historic_era_paleolithic">Historic era: paleolithic (2.6 million years 10000 BP)</string>
<string name="poi_historic_era_mesolithic">Historic era: mesolithic</string>
<string name="poi_historic_era_neolithic">Historic era: neolithic</string>
<string name="poi_historic_era_chalcolithic">Historic era: chalcolithic (IV-III millennium BC.)</string>
<string name="poi_historic_stone">Historic stone</string>
<string name="poi_stone_type_conciliation_cross">Type: conciliation cross</string>
<string name="poi_stone_type_coat_of_arms">Type: coat of arms</string>
<string name="poi_material_wood">Material: wood</string>
<string name="poi_material_metal">Material: metal</string>
<string name="poi_material_reinforced_concrete">Material: reinforced concrete</string>
<string name="poi_material_concrete">Material: concrete</string>
<string name="poi_material_steel">Material: steel</string>
<string name="poi_material_stone">Material: stone</string>
<string name="poi_material_masonry">Material: masonry</string>
<string name="poi_material_brick">Material: brick</string>
<string name="poi_material_plastic">Material: plastic</string>
<string name="poi_material_sandstone">Material: sandstone</string>
<string name="poi_material_granite_stone">Material: granite stone</string>
<string name="poi_material_metal_wood">Material: metal;wood</string>
<string name="poi_material_glass">Material: glass</string>
<string name="poi_material_bronze">Material: bronze</string>
<string name="poi_material_earth">Material: earth</string>
<string name="poi_material_composite">Material: composite</string>
<string name="poi_material_limestone">Material: limestone</string>
<string name="poi_material_marble">Material: marble</string>
<string name="poi_material_aluminium">Material: aluminium</string>
<string name="poi_site_type_megalith">Type: megalith</string>
<string name="poi_site_type_tumulus">Type: tumulus</string>
<string name="poi_site_type_fortification">Type: fortification</string>
<string name="poi_site_type_settlement">Type: settlement</string>
<string name="poi_site_type_city">Type: city</string>
<string name="poi_site_type_hut_circle">Type: hut circle</string>
<string name="poi_site_type_necropolis">Type: necropolis</string>
<string name="poi_site_type_petroglyph">Type: petroglyph</string>
<string name="poi_site_type_earthwork">Type: earthwork</string>
<string name="poi_megalith_type_menhir">Megalith type: menhir</string>
<string name="poi_megalith_type_dolmen">Megalith type: dolmen</string>
<string name="poi_megalith_type_nuraghe">Megalith type: nuraghe</string>
<string name="poi_megalith_type_stone_circle">Megalith type: stone circle</string>
<string name="poi_megalith_type_passage_grave">Megalith type: passage grave</string>
<string name="poi_fortification_type_hill_fort">Fortification type: hill fort</string>
<string name="poi_fortification_type_limes">Fortification type: limes</string>
<string name="poi_fortification_type_sconce">Fortification type: sconce</string>
<string name="poi_fortification_type_ring_ditch">Fortification type: ring ditch</string>
<string name="poi_pa">Pa (maori fortified settlement)</string>
<string name="poi_historic_farm">Historic farm</string>
<string name="poi_historic_railway_station">Historic railway station</string>
</resources> </resources>

View file

@ -37,6 +37,7 @@ public class PointDescription implements Serializable {
public static final String POINT_TYPE_VIDEO_NOTE = "videonote"; public static final String POINT_TYPE_VIDEO_NOTE = "videonote";
public static final String POINT_TYPE_PHOTO_NOTE = "photonote"; public static final String POINT_TYPE_PHOTO_NOTE = "photonote";
public static final String POINT_TYPE_LOCATION = "location"; public static final String POINT_TYPE_LOCATION = "location";
public static final String POINT_TYPE_MY_LOCATION = "my_location";
public static final String POINT_TYPE_ALARM = "alarm"; public static final String POINT_TYPE_ALARM = "alarm";
public static final String POINT_TYPE_TARGET = "destination"; public static final String POINT_TYPE_TARGET = "destination";
public static final String POINT_TYPE_OSM_BUG = "bug"; public static final String POINT_TYPE_OSM_BUG = "bug";
@ -188,6 +189,10 @@ public class PointDescription implements Serializable {
return POINT_TYPE_PARKING_MARKER.equals(type); return POINT_TYPE_PARKING_MARKER.equals(type);
} }
public boolean isMyLocation() {
return POINT_TYPE_MY_LOCATION.equals(type);
}
@Override @Override
public int hashCode() { public int hashCode() {
final int prime = 31; final int prime = 31;

View file

@ -65,7 +65,6 @@ public abstract class BaseMenuController {
protected Drawable getIcon(int iconId, int colorLightId, int colorDarkId) { protected Drawable getIcon(int iconId, int colorLightId, int colorDarkId) {
IconsCache iconsCache = getMapActivity().getMyApplication().getIconsCache(); IconsCache iconsCache = getMapActivity().getMyApplication().getIconsCache();
return iconsCache.getIcon(iconId, return iconsCache.getIcon(iconId, isLight() ? colorLightId : colorDarkId);
isLight() ? colorLightId : colorDarkId);
} }
} }

View file

@ -125,7 +125,7 @@ public class MapContextMenu extends MenuTitleController {
initTitle(); initTitle();
if (menuController != null) { if (menuController != null) {
menuController.addPlainMenuItems(typeStr, this.pointDescription); menuController.addPlainMenuItems(typeStr, this.pointDescription, this.latLon);
} }
if (mapPosition != 0) { if (mapPosition != 0) {
@ -190,7 +190,7 @@ public class MapContextMenu extends MenuTitleController {
} }
private void acquireMenuController() { private void acquireMenuController() {
menuController = MenuController.getMenuController(mapActivity, latLon, pointDescription, object); menuController = MenuController.getMenuController(mapActivity, pointDescription, object);
} }
public void onSingleTapOnMap() { public void onSingleTapOnMap() {
@ -313,7 +313,7 @@ public class MapContextMenu extends MenuTitleController {
acquireIcons(); acquireIcons();
if (menuController != null) { if (menuController != null) {
menuController.addPlainMenuItems(typeStr, this.pointDescription); menuController.addPlainMenuItems(typeStr, pointDescription, latLon);
} }
} }

View file

@ -23,7 +23,7 @@ import java.util.LinkedList;
import static android.util.TypedValue.COMPLEX_UNIT_DIP; import static android.util.TypedValue.COMPLEX_UNIT_DIP;
public abstract class MenuBuilder { public class MenuBuilder {
public static final float SHADOW_HEIGHT_TOP_DP = 16f; public static final float SHADOW_HEIGHT_TOP_DP = 16f;
public static final float SHADOW_HEIGHT_BOTTOM_DP = 6f; public static final float SHADOW_HEIGHT_BOTTOM_DP = 6f;
@ -59,6 +59,19 @@ public abstract class MenuBuilder {
public void build(View view) { public void build(View view) {
firstRow = true; firstRow = true;
if (needBuildPlainMenuItems()) {
buildPlainMenuItems(view);
}
}
protected void buildPlainMenuItems(View view) {
for (PlainMenuItem item : plainMenuItems) {
buildRow(view, item.getIconId(), item.getText(), 0);
}
}
protected boolean needBuildPlainMenuItems() {
return true;
} }
protected boolean isFirstRow() { protected boolean isFirstRow() {
@ -69,6 +82,10 @@ public abstract class MenuBuilder {
firstRow = false; firstRow = false;
} }
private void buildRow(View view, int iconId, String text, int textColor) {
buildRow(view, getRowIcon(iconId), text, textColor);
}
protected void buildRow(final View view, Drawable icon, String text, int textColor) { protected void buildRow(final View view, Drawable icon, String text, int textColor) {
LinearLayout ll = new LinearLayout(view.getContext()); LinearLayout ll = new LinearLayout(view.getContext());
ll.setOrientation(LinearLayout.HORIZONTAL); ll.setOrientation(LinearLayout.HORIZONTAL);

View file

@ -8,7 +8,6 @@ import net.osmand.data.Amenity;
import net.osmand.data.FavouritePoint; import net.osmand.data.FavouritePoint;
import net.osmand.data.LatLon; import net.osmand.data.LatLon;
import net.osmand.data.PointDescription; import net.osmand.data.PointDescription;
import net.osmand.plus.IconsCache;
import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandApplication;
import net.osmand.plus.R; import net.osmand.plus.R;
import net.osmand.plus.activities.MapActivity; import net.osmand.plus.activities.MapActivity;
@ -16,6 +15,7 @@ import net.osmand.plus.helpers.SearchHistoryHelper;
import net.osmand.plus.mapcontextmenu.details.AmenityMenuController; import net.osmand.plus.mapcontextmenu.details.AmenityMenuController;
import net.osmand.plus.mapcontextmenu.details.FavouritePointMenuController; import net.osmand.plus.mapcontextmenu.details.FavouritePointMenuController;
import net.osmand.plus.mapcontextmenu.details.HistoryMenuController; import net.osmand.plus.mapcontextmenu.details.HistoryMenuController;
import net.osmand.plus.mapcontextmenu.details.MyLocationMenuController;
import net.osmand.plus.mapcontextmenu.details.ParkingPositionController; import net.osmand.plus.mapcontextmenu.details.ParkingPositionController;
import net.osmand.plus.mapcontextmenu.details.PointDescriptionMenuController; import net.osmand.plus.mapcontextmenu.details.PointDescriptionMenuController;
@ -41,7 +41,7 @@ public abstract class MenuController extends BaseMenuController {
} }
public static MenuController getMenuController(MapActivity mapActivity, public static MenuController getMenuController(MapActivity mapActivity,
LatLon latLon, PointDescription pointDescription, Object object) { PointDescription pointDescription, Object object) {
OsmandApplication app = mapActivity.getMyApplication(); OsmandApplication app = mapActivity.getMyApplication();
MenuController menuController = null; MenuController menuController = null;
if (object != null) { if (object != null) {
@ -54,10 +54,12 @@ public abstract class MenuController extends BaseMenuController {
} else if (object instanceof LatLon) { } else if (object instanceof LatLon) {
if (pointDescription.isParking()) { if (pointDescription.isParking()) {
menuController = new ParkingPositionController(app, mapActivity, pointDescription, (LatLon) object); menuController = new ParkingPositionController(app, mapActivity, pointDescription, (LatLon) object);
} else if (pointDescription.isMyLocation()) {
menuController = new MyLocationMenuController(app, mapActivity, pointDescription, (LatLon) object);
} }
} }
} else { } else {
menuController = new PointDescriptionMenuController(app, mapActivity, pointDescription, latLon); menuController = new PointDescriptionMenuController(app, mapActivity, pointDescription);
} }
return menuController; return menuController;
} }
@ -66,7 +68,15 @@ public abstract class MenuController extends BaseMenuController {
builder.addPlainMenuItem(iconId, text); builder.addPlainMenuItem(iconId, text);
} }
public void addPlainMenuItems(String typeStr, PointDescription pointDescription) { public void addPlainMenuItems(String typeStr, PointDescription pointDescription, LatLon latLon) {
addMyLocationToPlainItems(pointDescription, latLon);
}
protected void addMyLocationToPlainItems(PointDescription pointDescription, LatLon latLon) {
if (pointDescription != null) {
addPlainMenuItem(R.drawable.map_my_location, PointDescription.getLocationName(getMapActivity(),
latLon.getLatitude(), latLon.getLongitude(), true).replaceAll("\n", ""));
}
} }
public int getInitialMenuState() { public int getInitialMenuState() {

View file

@ -119,14 +119,9 @@ public class AmenityMenuBuilder extends MenuBuilder {
super.build(view); super.build(view);
boolean hasWiki = false; boolean hasWiki = false;
for (PlainMenuItem item : plainMenuItems) {
buildRow(view, item.getIconId(), item.getText(), 0, false);
}
MapPoiTypes poiTypes = app.getPoiTypes(); MapPoiTypes poiTypes = app.getPoiTypes();
for (Map.Entry<String, String> e : amenity.getAdditionalInfo().entrySet()) { for (Map.Entry<String, String> e : amenity.getAdditionalInfo().entrySet()) {
int iconId = 0; int iconId;
Drawable icon = null; Drawable icon = null;
int textColor = 0; int textColor = 0;
boolean isWiki = false; boolean isWiki = false;

View file

@ -3,6 +3,7 @@ package net.osmand.plus.mapcontextmenu.details;
import android.os.Bundle; import android.os.Bundle;
import net.osmand.data.Amenity; import net.osmand.data.Amenity;
import net.osmand.data.LatLon;
import net.osmand.data.PointDescription; import net.osmand.data.PointDescription;
import net.osmand.osm.PoiCategory; import net.osmand.osm.PoiCategory;
import net.osmand.osm.PoiType; import net.osmand.osm.PoiType;
@ -74,14 +75,11 @@ public class AmenityMenuController extends MenuController {
} }
@Override @Override
public void addPlainMenuItems(String typeStr, PointDescription pointDescription) { public void addPlainMenuItems(String typeStr, PointDescription pointDescription, LatLon latLon) {
if (!Algorithms.isEmpty(typeStr)) { if (!Algorithms.isEmpty(typeStr)) {
addPlainMenuItem(R.drawable.ic_action_info_dark, typeStr); addPlainMenuItem(R.drawable.ic_action_info_dark, typeStr);
} }
if (pointDescription != null) { addMyLocationToPlainItems(pointDescription, amenity.getLocation());
addPlainMenuItem(R.drawable.map_my_location, PointDescription.getLocationName(getMapActivity(),
amenity.getLocation().getLatitude(), amenity.getLocation().getLongitude(), true).replaceAll("\n", ""));
}
} }
@Override @Override

View file

@ -21,6 +21,11 @@ public class FavouritePointMenuBuilder extends MenuBuilder {
buildRow(view, getRowIcon(iconId), text, textColor); buildRow(view, getRowIcon(iconId), text, textColor);
} }
@Override
protected boolean needBuildPlainMenuItems() {
return false;
}
@Override @Override
public void build(View view) { public void build(View view) {
super.build(view); super.build(view);
@ -29,8 +34,6 @@ public class FavouritePointMenuBuilder extends MenuBuilder {
buildRow(view, R.drawable.ic_action_note_dark, fav.getDescription(), 0); buildRow(view, R.drawable.ic_action_note_dark, fav.getDescription(), 0);
} }
for (PlainMenuItem item : plainMenuItems) { buildPlainMenuItems(view);
buildRow(view, item.getIconId(), item.getText(), 0);
}
} }
} }

View file

@ -5,7 +5,6 @@ import android.os.Bundle;
import android.support.v4.app.Fragment; import android.support.v4.app.Fragment;
import net.osmand.data.FavouritePoint; import net.osmand.data.FavouritePoint;
import net.osmand.data.PointDescription;
import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandApplication;
import net.osmand.plus.R; import net.osmand.plus.R;
import net.osmand.plus.activities.MapActivity; import net.osmand.plus.activities.MapActivity;
@ -79,14 +78,6 @@ public class FavouritePointMenuController extends MenuController {
return fav.getName(); return fav.getName();
} }
@Override
public void addPlainMenuItems(String typeStr, PointDescription pointDescription) {
if (pointDescription != null) {
addPlainMenuItem(R.drawable.map_my_location, PointDescription.getLocationName(getMapActivity(),
fav.getLatitude(), fav.getLongitude(), true).replaceAll("\n", ""));
}
}
@Override @Override
public void saveEntityState(Bundle bundle, String key) { public void saveEntityState(Bundle bundle, String key) {
bundle.putSerializable(key, fav); bundle.putSerializable(key, fav);

View file

@ -1,29 +0,0 @@
package net.osmand.plus.mapcontextmenu.details;
import android.view.View;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.helpers.SearchHistoryHelper.HistoryEntry;
import net.osmand.plus.mapcontextmenu.MenuBuilder;
public class HistoryMenuBuilder extends MenuBuilder {
private final HistoryEntry entry;
public HistoryMenuBuilder(OsmandApplication app, final HistoryEntry entry) {
super(app);
this.entry = entry;
}
private void buildRow(View view, int iconId, String text, int textColor) {
buildRow(view, getRowIcon(iconId), text, textColor);
}
@Override
public void build(View view) {
super.build(view);
for (PlainMenuItem item : plainMenuItems) {
buildRow(view, item.getIconId(), item.getText(), 0);
}
}
}

View file

@ -3,12 +3,12 @@ package net.osmand.plus.mapcontextmenu.details;
import android.graphics.drawable.Drawable; import android.graphics.drawable.Drawable;
import android.os.Bundle; import android.os.Bundle;
import net.osmand.data.PointDescription;
import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandApplication;
import net.osmand.plus.R; import net.osmand.plus.R;
import net.osmand.plus.activities.MapActivity; import net.osmand.plus.activities.MapActivity;
import net.osmand.plus.activities.search.SearchHistoryFragment; import net.osmand.plus.activities.search.SearchHistoryFragment;
import net.osmand.plus.helpers.SearchHistoryHelper.HistoryEntry; import net.osmand.plus.helpers.SearchHistoryHelper.HistoryEntry;
import net.osmand.plus.mapcontextmenu.MenuBuilder;
import net.osmand.plus.mapcontextmenu.MenuController; import net.osmand.plus.mapcontextmenu.MenuController;
public class HistoryMenuController extends MenuController { public class HistoryMenuController extends MenuController {
@ -16,7 +16,7 @@ public class HistoryMenuController extends MenuController {
private HistoryEntry entry; private HistoryEntry entry;
public HistoryMenuController(OsmandApplication app, MapActivity mapActivity, final HistoryEntry entry) { public HistoryMenuController(OsmandApplication app, MapActivity mapActivity, final HistoryEntry entry) {
super(new HistoryMenuBuilder(app, entry), mapActivity); super(new MenuBuilder(app), mapActivity);
this.entry = entry; this.entry = entry;
} }
@ -69,14 +69,6 @@ public class HistoryMenuController extends MenuController {
return !entry.getName().isAddress(); return !entry.getName().isAddress();
} }
@Override
public void addPlainMenuItems(String typeStr, PointDescription pointDescription) {
if (pointDescription != null) {
addPlainMenuItem(R.drawable.map_my_location, PointDescription.getLocationName(getMapActivity(),
entry.getLat(), entry.getLon(), true).replaceAll("\n", ""));
}
}
@Override @Override
public void saveEntityState(Bundle bundle, String key) { public void saveEntityState(Bundle bundle, String key) {
bundle.putSerializable(key, entry); bundle.putSerializable(key, entry);

View file

@ -0,0 +1,50 @@
package net.osmand.plus.mapcontextmenu.details;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import net.osmand.data.LatLon;
import net.osmand.data.PointDescription;
import net.osmand.plus.ApplicationMode;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.activities.MapActivity;
import net.osmand.plus.mapcontextmenu.MenuBuilder;
import net.osmand.plus.mapcontextmenu.MenuController;
public class MyLocationMenuController extends MenuController {
private LatLon latLon;
private PointDescription pointDescription;
public MyLocationMenuController(OsmandApplication app, MapActivity mapActivity, final PointDescription pointDescription, LatLon latLon) {
super(new MenuBuilder(app), mapActivity);
this.pointDescription = pointDescription;
this.latLon = latLon;
}
@Override
protected int getInitialMenuStatePortrait() {
return MenuState.HEADER_ONLY;
}
@Override
protected int getSupportedMenuStatesPortrait() {
return MenuState.HEADER_ONLY | MenuState.HALF_SCREEN;
}
@Override
public Drawable getLeftIcon() {
ApplicationMode appMode = getMapActivity().getMyApplication().getSettings().getApplicationMode();
return getMapActivity().getResources().getDrawable(appMode.getResourceLocation());
}
@Override
public String getNameStr() {
return pointDescription.getTypeName();
}
@Override
public void saveEntityState(Bundle bundle, String key) {
bundle.putSerializable(key, latLon);
}
}

View file

@ -1,26 +0,0 @@
package net.osmand.plus.mapcontextmenu.details;
import android.view.View;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.mapcontextmenu.MenuBuilder;
public class ParkingPositionBuilder extends MenuBuilder {
public ParkingPositionBuilder(OsmandApplication app) {
super(app);
}
private void buildRow(View view, int iconId, String text, int textColor) {
buildRow(view, getRowIcon(iconId), text, textColor);
}
@Override
public void build(View view) {
super.build(view);
for (PlainMenuItem item : plainMenuItems) {
buildRow(view, item.getIconId(), item.getText(), 0);
}
}
}

View file

@ -9,6 +9,7 @@ import net.osmand.plus.OsmandApplication;
import net.osmand.plus.OsmandPlugin; import net.osmand.plus.OsmandPlugin;
import net.osmand.plus.R; import net.osmand.plus.R;
import net.osmand.plus.activities.MapActivity; import net.osmand.plus.activities.MapActivity;
import net.osmand.plus.mapcontextmenu.MenuBuilder;
import net.osmand.plus.mapcontextmenu.MenuController; import net.osmand.plus.mapcontextmenu.MenuController;
import net.osmand.plus.parkingpoint.ParkingPositionPlugin; import net.osmand.plus.parkingpoint.ParkingPositionPlugin;
import net.osmand.util.Algorithms; import net.osmand.util.Algorithms;
@ -21,7 +22,7 @@ public class ParkingPositionController extends MenuController {
String parkingDescription = ""; String parkingDescription = "";
public ParkingPositionController(OsmandApplication app, MapActivity mapActivity, final PointDescription pointDescription, LatLon latLon) { public ParkingPositionController(OsmandApplication app, MapActivity mapActivity, final PointDescription pointDescription, LatLon latLon) {
super(new ParkingPositionBuilder(app), mapActivity); super(new MenuBuilder(app), mapActivity);
this.pointDescription = pointDescription; this.pointDescription = pointDescription;
this.latLon = latLon; this.latLon = latLon;
plugin = OsmandPlugin.getPlugin(ParkingPositionPlugin.class); plugin = OsmandPlugin.getPlugin(ParkingPositionPlugin.class);
@ -88,14 +89,6 @@ public class ParkingPositionController extends MenuController {
return false; return false;
} }
@Override
public void addPlainMenuItems(String typeStr, PointDescription pointDescription) {
if (pointDescription != null) {
addPlainMenuItem(R.drawable.map_my_location, PointDescription.getLocationName(getMapActivity(),
latLon.getLatitude(), latLon.getLongitude(), true).replaceAll("\n", ""));
}
}
@Override @Override
public void saveEntityState(Bundle bundle, String key) { public void saveEntityState(Bundle bundle, String key) {
bundle.putSerializable(key, latLon); bundle.putSerializable(key, latLon);

View file

@ -1,29 +0,0 @@
package net.osmand.plus.mapcontextmenu.details;
import android.view.View;
import net.osmand.data.PointDescription;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.mapcontextmenu.MenuBuilder;
public class PointDescriptionMenuBuilder extends MenuBuilder {
private final PointDescription pointDescription;
public PointDescriptionMenuBuilder(OsmandApplication app, final PointDescription pointDescription) {
super(app);
this.pointDescription = pointDescription;
}
private void buildRow(View view, int iconId, String text, int textColor) {
buildRow(view, getRowIcon(iconId), text, textColor);
}
@Override
public void build(View view) {
super.build(view);
for (MenuBuilder.PlainMenuItem item : plainMenuItems) {
buildRow(view, item.getIconId(), item.getText(), 0);
}
}
}

View file

@ -3,23 +3,21 @@ package net.osmand.plus.mapcontextmenu.details;
import android.graphics.drawable.Drawable; import android.graphics.drawable.Drawable;
import android.os.Bundle; import android.os.Bundle;
import net.osmand.data.LatLon;
import net.osmand.data.PointDescription; import net.osmand.data.PointDescription;
import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandApplication;
import net.osmand.plus.R; import net.osmand.plus.R;
import net.osmand.plus.activities.MapActivity; import net.osmand.plus.activities.MapActivity;
import net.osmand.plus.activities.search.SearchHistoryFragment; import net.osmand.plus.activities.search.SearchHistoryFragment;
import net.osmand.plus.mapcontextmenu.MenuBuilder;
import net.osmand.plus.mapcontextmenu.MenuController; import net.osmand.plus.mapcontextmenu.MenuController;
public class PointDescriptionMenuController extends MenuController { public class PointDescriptionMenuController extends MenuController {
private PointDescription pointDescription; private PointDescription pointDescription;
private LatLon latLon;
public PointDescriptionMenuController(OsmandApplication app, MapActivity mapActivity, final PointDescription pointDescription, LatLon latLon) { public PointDescriptionMenuController(OsmandApplication app, MapActivity mapActivity, final PointDescription pointDescription) {
super(new PointDescriptionMenuBuilder(app, pointDescription), mapActivity); super(new MenuBuilder(app), mapActivity);
this.pointDescription = pointDescription; this.pointDescription = pointDescription;
this.latLon = latLon;
} }
@Override @Override
@ -71,14 +69,6 @@ public class PointDescriptionMenuController extends MenuController {
return !pointDescription.isAddress(); return !pointDescription.isAddress();
} }
@Override
public void addPlainMenuItems(String typeStr, PointDescription pointDescription) {
if (pointDescription != null) {
addPlainMenuItem(R.drawable.map_my_location, PointDescription.getLocationName(getMapActivity(),
latLon.getLatitude(), latLon.getLongitude(), true).replaceAll("\n", ""));
}
}
@Override @Override
public void saveEntityState(Bundle bundle, String key) { public void saveEntityState(Bundle bundle, String key) {
} }

View file

@ -47,7 +47,7 @@ public class ObjectSelectionMenu extends BaseMenuController {
} }
protected void init() { protected void init() {
controller = MenuController.getMenuController(mapActivity, latLon, pointDescription, object); controller = MenuController.getMenuController(mapActivity, pointDescription, object);
initTitle(); initTitle();
} }

View file

@ -2,6 +2,8 @@ package net.osmand.plus.views;
import net.osmand.Location; import net.osmand.Location;
import net.osmand.data.LatLon;
import net.osmand.data.PointDescription;
import net.osmand.data.RotatedTileBox; import net.osmand.data.RotatedTileBox;
import net.osmand.plus.ApplicationMode; import net.osmand.plus.ApplicationMode;
import net.osmand.plus.OsmAndLocationProvider; import net.osmand.plus.OsmAndLocationProvider;
@ -12,9 +14,12 @@ import android.graphics.BitmapFactory;
import android.graphics.Canvas; import android.graphics.Canvas;
import android.graphics.Paint; import android.graphics.Paint;
import android.graphics.Paint.Style; import android.graphics.Paint.Style;
import android.graphics.PointF;
import android.graphics.RectF; import android.graphics.RectF;
public class PointLocationLayer extends OsmandMapLayer { import java.util.List;
public class PointLocationLayer extends OsmandMapLayer implements ContextMenuLayer.IContextMenuProvider {
protected final static int RADIUS = 7; protected final static int RADIUS = 7;
protected final static float HEADING_ANGLE = 60; protected final static float HEADING_ANGLE = 60;
@ -124,11 +129,8 @@ public class PointLocationLayer extends OsmandMapLayer {
} }
} }
public boolean isLocationVisible(RotatedTileBox tb, Location l){ public boolean isLocationVisible(RotatedTileBox tb, Location l) {
if(l == null ){ return l != null && tb.containsLatLon(l.getLatitude(), l.getLongitude());
return false;
}
return tb.containsLatLon(l.getLatitude(), l.getLongitude());
} }
@ -150,4 +152,57 @@ public class PointLocationLayer extends OsmandMapLayer {
} }
@Override
public void collectObjectsFromPoint(PointF point, RotatedTileBox tileBox, List<Object> o) {
getMyLocationFromPoint(tileBox, point, o);
}
@Override
public LatLon getObjectLocation(Object o) {
return getMyLocation();
}
@Override
public String getObjectDescription(Object o) {
return view.getResources().getString(R.string.shared_string_my_location);
}
@Override
public PointDescription getObjectName(Object o) {
return new PointDescription(PointDescription.POINT_TYPE_MY_LOCATION,
view.getContext().getString(R.string.shared_string_my_location), "");
}
@Override
public boolean disableSingleTap() {
return false;
}
@Override
public boolean disableLongPressOnMap() {
return false;
}
private LatLon getMyLocation() {
Location location = locationProvider.getLastKnownLocation();
if (location != null) {
return new LatLon(location.getLatitude(), location.getLongitude());
} else {
return null;
}
}
private void getMyLocationFromPoint(RotatedTileBox tb, PointF point, List<? super LatLon> myLocation) {
LatLon location = getMyLocation();
if (location != null && view != null) {
int ex = (int) point.x;
int ey = (int) point.y;
int x = (int) tb.getPixXFromLatLon(location.getLatitude(), location.getLongitude());
int y = (int) tb.getPixYFromLatLon(location.getLatitude(), location.getLongitude());
int rad = (int) (18 * tb.getDensity());
if (Math.abs(x - ex) <= rad && (ey - y) <= rad && (y - ey) <= 2.5 * rad) {
myLocation.add(location);
}
}
}
} }