Merge branch 'master' of https://github.com/osmandapp/Osmand
This commit is contained in:
commit
1a47c06108
15 changed files with 513 additions and 57 deletions
|
@ -1,6 +1,11 @@
|
|||
package net.osmand.router;
|
||||
|
||||
import gnu.trove.set.hash.TLongHashSet;
|
||||
import net.osmand.binary.BinaryMapRouteReaderAdapter.RouteRegion;
|
||||
import net.osmand.binary.BinaryMapRouteReaderAdapter.RouteTypeRule;
|
||||
import net.osmand.binary.RouteDataObject;
|
||||
import net.osmand.router.BinaryRoutePlanner.RouteSegment;
|
||||
import net.osmand.util.Algorithms;
|
||||
import net.osmand.util.MapUtils;
|
||||
|
||||
import java.io.PrintStream;
|
||||
import java.util.ArrayList;
|
||||
|
@ -14,12 +19,7 @@ import java.util.Map;
|
|||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
|
||||
import net.osmand.binary.BinaryMapRouteReaderAdapter.RouteRegion;
|
||||
import net.osmand.binary.BinaryMapRouteReaderAdapter.RouteTypeRule;
|
||||
import net.osmand.binary.RouteDataObject;
|
||||
import net.osmand.router.BinaryRoutePlanner.RouteSegment;
|
||||
import net.osmand.util.Algorithms;
|
||||
import net.osmand.util.MapUtils;
|
||||
import gnu.trove.set.hash.TLongHashSet;
|
||||
|
||||
public class GeneralRouter implements VehicleRouter {
|
||||
|
||||
|
@ -875,7 +875,7 @@ public class GeneralRouter implements VehicleRouter {
|
|||
|
||||
}
|
||||
|
||||
public void addImpassableRoads(TLongHashSet impassableRoads) {
|
||||
public void addImpassableRoads(Set<Long> impassableRoads) {
|
||||
if (impassableRoads != null && !impassableRoads.isEmpty()) {
|
||||
if (this.impassableRoads == null) {
|
||||
this.impassableRoads = new TLongHashSet();
|
||||
|
|
|
@ -1,15 +1,6 @@
|
|||
package net.osmand.router;
|
||||
|
||||
import gnu.trove.set.hash.TLongHashSet;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Stack;
|
||||
|
||||
import net.osmand.Location;
|
||||
import net.osmand.PlatformUtil;
|
||||
import net.osmand.binary.RouteDataObject;
|
||||
import net.osmand.router.GeneralRouter.GeneralRouterProfile;
|
||||
|
@ -20,6 +11,15 @@ import net.osmand.util.Algorithms;
|
|||
import org.xmlpull.v1.XmlPullParser;
|
||||
import org.xmlpull.v1.XmlPullParserException;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Stack;
|
||||
|
||||
public class RoutingConfiguration {
|
||||
|
||||
public static final int DEFAULT_MEMORY_LIMIT = 30;
|
||||
|
@ -55,12 +55,12 @@ public class RoutingConfiguration {
|
|||
private String defaultRouter = "";
|
||||
private Map<String, GeneralRouter> routers = new LinkedHashMap<String, GeneralRouter>();
|
||||
private Map<String, String> attributes = new LinkedHashMap<String, String>();
|
||||
private TLongHashSet impassableRoadIds = new TLongHashSet();
|
||||
private HashMap<Long, Location> impassableRoadLocations = new HashMap<>();
|
||||
private List<RouteDataObject> impassableRoads = new ArrayList<RouteDataObject>();
|
||||
|
||||
// Example
|
||||
// {
|
||||
// impassableRoadIds.add(23000069L);
|
||||
// impassableRoadLocations.add(23000069L);
|
||||
// }
|
||||
|
||||
public RoutingConfiguration build(String router, int memoryLimitMB) {
|
||||
|
@ -87,7 +87,7 @@ public class RoutingConfiguration {
|
|||
i.initialDirection = direction;
|
||||
i.recalculateDistance = parseSilentFloat(getAttribute(i.router, "recalculateDistanceHelp"), i.recalculateDistance) ;
|
||||
i.heuristicCoefficient = parseSilentFloat(getAttribute(i.router, "heuristicCoefficient"), i.heuristicCoefficient);
|
||||
i.router.addImpassableRoads(impassableRoadIds);
|
||||
i.router.addImpassableRoads(impassableRoadLocations.keySet());
|
||||
i.ZOOM_TO_LOAD_TILES = parseSilentInt(getAttribute(i.router, "zoomToLoadTiles"), i.ZOOM_TO_LOAD_TILES);
|
||||
int desirable = parseSilentInt(getAttribute(i.router, "memoryLimitInMB"), 0);
|
||||
if(desirable != 0) {
|
||||
|
@ -109,14 +109,14 @@ public class RoutingConfiguration {
|
|||
return impassableRoads;
|
||||
}
|
||||
|
||||
public TLongHashSet getImpassableRoadIds() {
|
||||
return impassableRoadIds;
|
||||
public Map<Long, Location> getImpassableRoadLocations() {
|
||||
return impassableRoadLocations;
|
||||
}
|
||||
|
||||
public void addImpassableRoad(RouteDataObject r) {
|
||||
if (!impassableRoadIds.contains(r.id)){
|
||||
impassableRoadIds.add(r.id);
|
||||
impassableRoads.add(r);
|
||||
public void addImpassableRoad(RouteDataObject route, Location location) {
|
||||
if (!impassableRoadLocations.containsKey(route.id)){
|
||||
impassableRoadLocations.put(route.id, location);
|
||||
impassableRoads.add(route);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -139,7 +139,7 @@ public class RoutingConfiguration {
|
|||
}
|
||||
|
||||
public void removeImpassableRoad(RouteDataObject obj) {
|
||||
impassableRoadIds.remove(obj.id);
|
||||
impassableRoadLocations.remove(obj.id);
|
||||
impassableRoads.remove(obj);
|
||||
|
||||
}
|
||||
|
|
|
@ -28,4 +28,5 @@
|
|||
<string name="hint_value">Value</string>
|
||||
<string name="clear_updates_proposition_message">"You can remove downloaded updates and free "</string>
|
||||
<string name="add_time_span">Add time span</string>
|
||||
<string name="road_blocked">Road blocked</string>
|
||||
</resources>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="no"?><resources><string name="auto_zoom_none">Без аўтаматычнага маштабаваньня</string>
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<resources><string name="auto_zoom_none">Без аўтаматычнага маштабаваньня</string>
|
||||
<string name="auto_zoom_close">Буйней</string>
|
||||
<string name="auto_zoom_far">Для сярэдняга маштаба</string>
|
||||
<string name="auto_zoom_farthest">Драбней</string>
|
||||
|
@ -599,7 +600,7 @@
|
|||
|
||||
<string name="poi_filter_nominatim">Сеткавы Nominatim</string>
|
||||
<string name="search_position_current_location_search">Вызначэньне становішча…</string>
|
||||
<string name="search_position_current_location_found">Становішча (знойдзена)</string>
|
||||
<string name="search_position_current_location_found">Маё становішча (знойдзена)</string>
|
||||
<string name="search_position_address">Адрас…</string>
|
||||
<string name="search_position_favorites">Упадабаныя…</string>
|
||||
<string name="search_position_undefined">Нявызначана</string>
|
||||
|
@ -2088,4 +2089,9 @@
|
|||
<string name="weekly">Штотыднёва</string>
|
||||
<string name="morning">Раніца</string>
|
||||
<string name="Night">Ноч</string>
|
||||
</resources>
|
||||
<string name="shared_string_type">Тып</string>
|
||||
<string name="starting_point">Пачатковы пункт</string>
|
||||
<string name="shared_string_undo_all">ВЯРНУЦЬ УСЁ</string>
|
||||
<string name="rec_split_storage_size">Памер сховішча</string>
|
||||
<string name="select_month_and_country">Выберыце месяц і краіну</string>
|
||||
</resources>
|
||||
|
|
|
@ -490,7 +490,7 @@
|
|||
<string name="file_with_name_already_exist">Der eksisterer allerede en fil med samme navn.</string>
|
||||
|
||||
<string name="local_index_upload_gpx_description">Send GPX-filer til OSM netværket. De vil blive brugt til at forbedre kort.</string>
|
||||
<string name="local_index_items_uploaded">%1$d af %2$d poster overført.</string>
|
||||
<string name="local_index_items_uploaded">%1$d af %2$d emner overført.</string>
|
||||
<string name="local_index_mi_upload_gpx">Send til OSM</string>
|
||||
<string name="show_more_map_detail">Vis flere kortdetaljer</string>
|
||||
<string name="favorite_home_category">Hjem</string>
|
||||
|
@ -779,7 +779,7 @@
|
|||
<string name="amenity_type_landuse">Arealanvendelse</string>
|
||||
<string name="amenity_type_sustenance">Mad og drikke</string>
|
||||
<string name="voice_is_not_available_msg">Stemmevejledning er ikke tilgængelig. Gå til \'Indstillinger\' → \'Generelt\' → \'Stemmevejledning\' og vælg eller hent en stemmevejledning.</string>
|
||||
<string name="items_were_selected">{0} enheder valgt</string>
|
||||
<string name="items_were_selected">{0} emner valgt</string>
|
||||
<string name="filter_existing_indexes">Hentet</string>
|
||||
<string name="fast_route_mode">Hurtigste rute</string>
|
||||
<string name="fast_route_mode_descr">Aktiver for at beregne den hurtigste rute. Deaktiver for at beregne korteste rute </string>
|
||||
|
@ -1614,7 +1614,7 @@
|
|||
<string name="traffic_warning_calming">Trafikdæmpning</string>
|
||||
<string name="traffic_warning_speed_camera">Fartkamera</string>
|
||||
<string name="traffic_warning">Trafikadvarsel</string>
|
||||
<string name="local_index_description">Klik på et eksisterende element for at se flere detaljer, langt tryk for at deaktivere eller slette. Aktuelle data på enhed (%1$s ledig):</string>
|
||||
<string name="local_index_description">Klik på et eksisterende emne for at se flere detaljer, langt tryk for at deaktivere eller slette. Aktuelle data på enhed (%1$s ledig):</string>
|
||||
<string name="text_size_descr">Vælg tekststørrelsen på kortet.</string>
|
||||
<string name="text_size">Tekststørrelse</string>
|
||||
<string name="fav_point_dublicate">Favoritnavn dublet</string>
|
||||
|
@ -2222,7 +2222,7 @@
|
|||
<string name="select_month_and_country">Vælg måned og land</string>
|
||||
<string name="shared_string_type">Type</string>
|
||||
<string name="starting_point">Udgangspunkt</string>
|
||||
<string name="item_deleted">Element slettet</string>
|
||||
<string name="n_items_deleted">elementer slettet</string>
|
||||
<string name="item_deleted">Emne slettet</string>
|
||||
<string name="n_items_deleted">Emner slettet</string>
|
||||
<string name="shared_string_undo_all">FORTRYD ALLE</string>
|
||||
</resources>
|
||||
|
|
|
@ -2023,7 +2023,7 @@
|
|||
<string name="update_time">Tiempo de actualización</string>
|
||||
|
||||
<string name="rec_split_storage_size">Tamaño del almacenamiento</string>
|
||||
<string name="updates_size">Actualizaciones: %s</string>
|
||||
<string name="updates_size">Tamaño de la actualización</string>
|
||||
<string name="last_map_change">Último cambio de mapa: %s</string>
|
||||
<string name="rec_split">División de grabación</string>
|
||||
<string name="rec_split_title">Usar la división de grabación</string>
|
||||
|
@ -2032,8 +2032,8 @@
|
|||
<string name="rec_split_clip_length_desc">La duración de cada clip grabado no excederá el tiempo de intervalo establecido</string>
|
||||
<string name="rec_split_storage_size_desc">Cantidad de espacio que pueden ocupar todos los clips grabados</string>
|
||||
<string name="hourly">Cada hora</string>
|
||||
<string name="daily">Diario</string>
|
||||
<string name="weekly">Semanal</string>
|
||||
<string name="daily">A diario</string>
|
||||
<string name="weekly">Cada semana</string>
|
||||
<string name="morning">Por la mañana</string>
|
||||
<string name="Night">Por la noche</string>
|
||||
<string name="shared_string_not_selected">No seleccionado</string>
|
||||
|
|
|
@ -701,7 +701,7 @@
|
|||
<string name="poi_wiki_lang_vo">Wiki en volapük</string>
|
||||
<string name="poi_wiki_lang_zh">Wiki en chinés</string>
|
||||
|
||||
<string name="poi_barrier_entrance">Entrada</string>
|
||||
<string name="poi_barrier_entrance">Pasaxe nun muro ou valado</string>
|
||||
<string name="poi_entrance_main">Entrada principal</string>
|
||||
<string name="poi_entrance">Entrada</string>
|
||||
<string name="poi_entrance_exit">Saída</string>
|
||||
|
@ -727,8 +727,8 @@
|
|||
<string name="poi_disused">En desuso</string>
|
||||
|
||||
<string name="poi_brand">Marca</string>
|
||||
<string name="poi_drinking_water_yes">Auga potábel</string>
|
||||
<string name="poi_drinking_water_no">Auga non potábel</string>
|
||||
<string name="poi_drinking_water_yes">Auga potábel: si</string>
|
||||
<string name="poi_drinking_water_no">Auga potábel: non</string>
|
||||
<string name="poi_supervised_yes">Vixiado</string>
|
||||
<string name="poi_supervised_no">Non vixiado</string>
|
||||
<string name="poi_seasonal_yes">Temporal</string>
|
||||
|
@ -739,7 +739,7 @@
|
|||
<string name="poi_seasonal_summer">Verán</string>
|
||||
<string name="poi_seasonal_autumn">Outono</string>
|
||||
<string name="poi_seasonal_winter">Inverno</string>
|
||||
<string name="poi_crossing_traffic_signals">Con sinais de tráfico</string>
|
||||
<string name="poi_crossing_traffic_signals">Con semáforo</string>
|
||||
<string name="poi_crossing_uncontrolled">Sen control</string>
|
||||
<string name="poi_crossing_unmarked">Sen marcas</string>
|
||||
<string name="poi_start_date">Data de inicio</string>
|
||||
|
@ -752,14 +752,14 @@
|
|||
<string name="poi_access_delivery">Acceso para entregas</string>
|
||||
<string name="poi_access_agricultural">Acceso agrícola</string>
|
||||
|
||||
<string name="poi_content_water">Auga (contido)</string>
|
||||
<string name="poi_content_fuel">Combustíbel (contido)</string>
|
||||
<string name="poi_content_wine">Viño (contido)</string>
|
||||
<string name="poi_content_biomass">Biomasa (contido)</string>
|
||||
<string name="poi_content_crop">Colleita (contido)</string>
|
||||
<string name="poi_content_fodder">Forraxe (contido)</string>
|
||||
<string name="poi_content_beer">Cervexa (contido)</string>
|
||||
<string name="poi_content_salt">Sal (contido)</string>
|
||||
<string name="poi_content_water">Contido: auga</string>
|
||||
<string name="poi_content_fuel">Contido: combustíbel</string>
|
||||
<string name="poi_content_wine">Contido: viño</string>
|
||||
<string name="poi_content_biomass">Contido: biomasa</string>
|
||||
<string name="poi_content_crop">Contido: colleita</string>
|
||||
<string name="poi_content_fodder">Contido: foraxe</string>
|
||||
<string name="poi_content_beer">Contido: cervexa</string>
|
||||
<string name="poi_content_salt">Contido: sal</string>
|
||||
<string name="poi_scuba_diving_shop">Tenda de materiais de mergullo con botella</string>
|
||||
<string name="poi_car_repair">Taller de automoción</string>
|
||||
<string name="poi_recycling_low_energy_bulbs">Lámpadas de baixo consumo</string>
|
||||
|
@ -770,7 +770,7 @@
|
|||
<string name="poi_collection_times">Horario de recollida</string>
|
||||
<string name="poi_building">Edificio</string>
|
||||
|
||||
<string name="poi_content_grain">Gran (contido)</string>
|
||||
<string name="poi_content_grain">Contido: gran</string>
|
||||
|
||||
<string name="poi_animal_shelter_dog">Canceira</string>
|
||||
<string name="poi_animal_shelter_cat">Refuxio para gatos</string>
|
||||
|
@ -816,4 +816,62 @@
|
|||
<string name="poi_glaziery">Tenda de vidro</string>
|
||||
<string name="poi_tableware">Tenda de vaixela</string>
|
||||
<string name="poi_ticket">Billeteira</string>
|
||||
<string name="poi_window_blind">Tenda de persianas</string>
|
||||
<string name="poi_car">Concesionario de automóbiles</string>
|
||||
<string name="poi_swimming_pool_shop">Tenda de material de piscina</string>
|
||||
<string name="poi_gate">Cancela</string>
|
||||
<string name="poi_traffic_signals">Semáforo</string>
|
||||
|
||||
<string name="poi_fuel_e10">E10</string>
|
||||
<string name="poi_fuel_e20">E20</string>
|
||||
<string name="poi_fuel_e85">E85</string>
|
||||
<string name="poi_runway">Pista de aterraxe</string>
|
||||
<string name="poi_junction">Encrucillada</string>
|
||||
<string name="poi_power_tower">Torre eléctrica</string>
|
||||
<string name="poi_power_pole">Poste eléctrico</string>
|
||||
|
||||
<string name="poi_telephone_exchange">Central telefónica</string>
|
||||
|
||||
<string name="poi_recycling_small_appliances">Electrodomésticos pequenos</string>
|
||||
<string name="poi_recycling_garden_waste">Residuos de xardín</string>
|
||||
<string name="poi_recycling_hazardous_waste">Residuos perigosos</string>
|
||||
<string name="poi_recycling_light_bulbs">Lámpadas eléctricas</string>
|
||||
<string name="poi_recycling_polyester">Poliéster</string>
|
||||
<string name="poi_school">Centro educativo</string>
|
||||
<string name="poi_college">Universidade</string>
|
||||
<string name="poi_paediatrics">Pediatría</string>
|
||||
|
||||
<string name="poi_archery">Tiro con arco</string>
|
||||
<string name="poi_shooting">Salón de tiro</string>
|
||||
<string name="poi_tourism_yes">Obxecto turístico</string>
|
||||
<string name="poi_attraction_animal">Animal (atracción)</string>
|
||||
<string name="poi_attraction_water_slide">Tobogán de auga</string>
|
||||
|
||||
<string name="poi_wilderness_hut">Refuxio</string>
|
||||
<string name="poi_hunting_lodge">Refuxio de caza</string>
|
||||
|
||||
<string name="poi_religion_unitarian_universalist">Universalismo unitario</string>
|
||||
<string name="poi_wine_cellar">Adega</string>
|
||||
<string name="poi_piste_snow_park">Parque de neve</string>
|
||||
<string name="poi_craft_bookbinder">Encadernación</string>
|
||||
<string name="poi_craft_window_construction">Carpintaría de aluminio</string>
|
||||
|
||||
<string name="poi_military_bunker">Búnker militar</string>
|
||||
<string name="poi_bollard">Bolardo</string>
|
||||
<string name="poi_cycle_barrier">Barreira para bicicletas</string>
|
||||
<string name="poi_motorcycle_barrier">Barreira para motos</string>
|
||||
<string name="poi_service_times">Horario de funcionamento</string>
|
||||
<string name="poi_height">Altura</string>
|
||||
<string name="poi_ele">Elevación sobre o nivel do mar</string>
|
||||
<string name="poi_wheelchair_no">Cadeira de rodas: inaccesíbel</string>
|
||||
<string name="poi_wheelchair_limited">Cadeira de rodas: limitado</string>
|
||||
<string name="poi_content_oil">Contido: aceite</string>
|
||||
<string name="poi_content_gas">Contido: gas</string>
|
||||
<string name="poi_content_wastewater">Contido: augas residuais</string>
|
||||
<string name="poi_nudism_yes">Nudismo: permitido</string>
|
||||
<string name="poi_nudism_no">Nudismo: prohibido</string>
|
||||
<string name="poi_nudism_obligatory">Nudismo: obrigatorio</string>
|
||||
<string name="poi_nudism_customary">Nudismo: tradicional</string>
|
||||
<string name="poi_nudism_permissive">Nudismo: permisivo</string>
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -1,3 +1,138 @@
|
|||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<resources><string name="poi_shop_food">חנות מזון</string>
|
||||
<string name="poi_shop">חנות</string>
|
||||
<string name="poi_emergency">שרותי חירום</string>
|
||||
<string name="poi_transportation">תחבורה</string>
|
||||
<string name="poi_road_obstacle">חסימות דרכים</string>
|
||||
<string name="poi_filling_station">תחנת דלק</string>
|
||||
<string name="poi_personal_transport">תחבורה אישית</string>
|
||||
<string name="poi_public_transport">תחבורה ציבורית</string>
|
||||
<string name="poi_air_transport">תחבורה אווירית</string>
|
||||
<string name="poi_water_transport">תחבורה ימית</string>
|
||||
<string name="poi_bicycle_transport">רכיבת אופניים</string>
|
||||
<string name="poi_aerialway_transport">תחבורת כבלים</string>
|
||||
<string name="poi_node_networks">רשת נקודות הליכה/רכיבה</string>
|
||||
<string name="poi_hiking_routes">שבילי הליכה</string>
|
||||
<string name="poi_traffic_enforcement">גורמי אכיפה תחבורתיים</string>
|
||||
<string name="poi_man_made">מעשה ידי אדם</string>
|
||||
<string name="poi_transport_construction">אמצעי תחבורה בבניה</string>
|
||||
<string name="poi_water_supply">אספקת מים</string>
|
||||
<string name="poi_power">תחנות כח</string>
|
||||
<string name="poi_communication">תקשורת</string>
|
||||
<string name="poi_trash_disposal">אתר פינוי אשפה</string>
|
||||
<string name="poi_landuse">שימושי קרקע</string>
|
||||
<string name="poi_education">חינוך</string>
|
||||
<string name="poi_administrative">אדמניסטרטיבי</string>
|
||||
<string name="poi_healthcare">בריאות</string>
|
||||
<string name="poi_office">משרד</string>
|
||||
<string name="poi_sport">ספורט</string>
|
||||
<string name="poi_tourism">תיירות</string>
|
||||
<string name="poi_sightseeing">אתרים</string>
|
||||
<string name="poi_accomodation">לינה</string>
|
||||
<string name="poi_internet_access">גישה לאינטרנט</string>
|
||||
<string name="poi_entertainment">בילוי</string>
|
||||
<string name="poi_club">מועדון</string>
|
||||
<string name="poi_sustenance">מזון</string>
|
||||
<string name="poi_cafe_and_restaurant">בית קפה ומסעדות</string>
|
||||
<string name="poi_service">שרותים</string>
|
||||
<string name="poi_craft">מלאכת יד</string>
|
||||
<string name="poi_finance">פיננסים</string>
|
||||
<string name="poi_natural">טבע</string>
|
||||
<string name="poi_seamark">נקודת ציון ימית</string>
|
||||
<string name="poi_military">צבא</string>
|
||||
<string name="poi_osmwiki">ויקיפדיה</string>
|
||||
<string name="poi_user_defined_other">אחר (מוגדר על ידי המשתמש)</string>
|
||||
|
||||
<string name="poi_palaeontological_site">אתר פליאונטולוגי</string>
|
||||
|
||||
<string name="poi_bakery">מאפיה</string>
|
||||
<string name="poi_alcohol">חנות משקאות</string>
|
||||
<string name="poi_cheese">חנות גבינות</string>
|
||||
<string name="poi_chocolate">חנות שוקולד</string>
|
||||
<string name="poi_coffee">חנות קפה</string>
|
||||
<string name="poi_convenience">חנות נוחות</string>
|
||||
<string name="poi_mall">מרכז קניות</string>
|
||||
<string name="poi_beverages">חנות משקאות</string>
|
||||
<string name="poi_butcher">שוק בשר</string>
|
||||
<string name="poi_deli">מעדניה</string>
|
||||
<string name="poi_farm">חנות מוצרי חווה</string>
|
||||
<string name="poi_seafood">חנות מאכלי ים</string>
|
||||
<string name="poi_ice_cream">גלידריה</string>
|
||||
<string name="poi_supermarket">סופרמרקט</string>
|
||||
<string name="poi_tea">חנות תה</string>
|
||||
<string name="poi_pasta">חנות פסטה</string>
|
||||
<string name="poi_pastry">חנות מאפים</string>
|
||||
<string name="poi_dairy">חלביה</string>
|
||||
<string name="poi_vending_machine">מכונת ממכר אוטומטית</string>
|
||||
<string name="poi_wine">חנות יין</string>
|
||||
|
||||
<string name="poi_books">חנות ספרים</string>
|
||||
<string name="poi_bicycle">חנות אופניים</string>
|
||||
<string name="poi_anime">חנות אנימה</string>
|
||||
<string name="poi_antiques">חנות עתיקות</string>
|
||||
<string name="poi_art">גלריה</string>
|
||||
<string name="poi_baby_goods">מוצרי תינוקות</string>
|
||||
<string name="poi_bag">חנות תיקים</string>
|
||||
<string name="poi_bathroom_furnishing">חנות מוצרי אמבטיה</string>
|
||||
<string name="poi_bed">חנות מיטות</string>
|
||||
<string name="poi_boutique">חנות אופנה</string>
|
||||
<string name="poi_camera">חנות מצלמות</string>
|
||||
<string name="poi_carpet">חנות שטיחים</string>
|
||||
<string name="poi_charity">תרומות וסיוע</string>
|
||||
<string name="poi_chemist">בית מרקחת</string>
|
||||
<string name="poi_clothes">חנות בגדים</string>
|
||||
<string name="poi_clothes_children">חנות בגדי ילדים</string>
|
||||
<string name="poi_shoes">חנות נעליים</string>
|
||||
<string name="poi_candles">חנות נרות</string>
|
||||
<string name="poi_computer">חנות מחשבים</string>
|
||||
<string name="poi_copyshop">ציוד משרדי והעתקות</string>
|
||||
<string name="poi_curtain">חנות וילונות</string>
|
||||
<string name="poi_fabric">חנות בדים</string>
|
||||
<string name="poi_dive">ציוד צלילה</string>
|
||||
<string name="poi_doityourself">עשה זאת בעצמך</string>
|
||||
<string name="poi_doors">חנות דלתות</string>
|
||||
<string name="poi_erotic">חנות סקס</string>
|
||||
<string name="poi_fashion">חנות אופנה</string>
|
||||
<string name="poi_fishing">ציוד דייג</string>
|
||||
<string name="poi_florist">חנות פרחים</string>
|
||||
<string name="poi_frame">חנות מסגרות</string>
|
||||
<string name="poi_furnace">חנות תנורים</string>
|
||||
<string name="poi_furniture">חנות רהיטים</string>
|
||||
<string name="poi_garden_centre">מרכז גינון</string>
|
||||
<string name="poi_garden_furniture">רהיטי גן</string>
|
||||
<string name="poi_gas">חנות גז</string>
|
||||
<string name="poi_general">כל-בו</string>
|
||||
<string name="poi_gift">חנות מתנות</string>
|
||||
<string name="poi_hifi">חנות מערכות סטראו</string>
|
||||
<string name="poi_houseware">חנות מוצרי בית</string>
|
||||
<string name="poi_hunting">ציוד צייד</string>
|
||||
<string name="poi_interior_decoration">חנות עיצוב פנים</string>
|
||||
<string name="poi_jewelry">חנות תכשיטים</string>
|
||||
<string name="poi_kiosk">קיוסק</string>
|
||||
<string name="poi_kitchen">רהיטי וציוד מטבח</string>
|
||||
<string name="poi_leather">חנות מוצרי עור</string>
|
||||
<string name="poi_medical_supply">אספקה רפואית</string>
|
||||
<string name="poi_mobile_phone">חנות טלפונים ניידים</string>
|
||||
<string name="poi_motorcycle">חנות אופנועים</string>
|
||||
<string name="poi_music">חנות מוסיקה</string>
|
||||
<string name="poi_musical_instrument">חנות כלי נגינה</string>
|
||||
<string name="poi_newsagent">סוכנות חדשות</string>
|
||||
<string name="poi_optician">אופטומטריסט</string>
|
||||
<string name="poi_organic">חנות מזון אורגני</string>
|
||||
<string name="poi_outdoor">חנות ציוד טבע</string>
|
||||
<string name="poi_paint">חנות ציור</string>
|
||||
<string name="poi_pet">חנות בעלי חיים</string>
|
||||
<string name="poi_photo">צלמניה</string>
|
||||
<string name="poi_radiotechnics">חנות אלקטרוניקה</string>
|
||||
<string name="poi_second_hand">חנות יד שניה</string>
|
||||
<string name="poi_scuba_diving_shop">חנות ציוד צלילה</string>
|
||||
<string name="poi_sports">מוצרי ספורט</string>
|
||||
<string name="poi_stationery">מוצרי סדקית</string>
|
||||
<string name="poi_tableware">חנות כלי שולחן</string>
|
||||
<string name="poi_ticket">משרד כרטיסים</string>
|
||||
<string name="poi_tobacco">חנות עישון</string>
|
||||
<string name="poi_toys">חנות צעצועים</string>
|
||||
<string name="poi_trade">חנות מסחר</string>
|
||||
<string name="poi_tyres">חנות צמיגים</string>
|
||||
<string name="poi_vacuum_cleaner">חנות שואבי אבק</string>
|
||||
</resources>
|
||||
|
|
|
@ -1104,7 +1104,7 @@
|
|||
<string name="use_kalman_filter_compass_descr">ניתן להשתמש במסנן קלמן למניעת סטיות מצפן</string>
|
||||
<string name="local_indexes_cat_srtm">נתוני קווי מתאר</string>
|
||||
<string name="wait_current_task_finished">נא להמתין להשלמת המשימה הנוכחית</string>
|
||||
<string name="shared_string_downloading">"בהורדה …"</string>
|
||||
<string name="shared_string_downloading">בהורדה</string>
|
||||
<string name="delete_point">מחיקת נקודה</string>
|
||||
<string name="plugin_distance_point_time">זמן</string>
|
||||
<string name="plugin_distance_point_hdop">דיוק</string>
|
||||
|
@ -1153,4 +1153,24 @@
|
|||
<string name="route_distance">מרחק:</string>
|
||||
<string name="route_duration">זמן:</string>
|
||||
<string name="shared_string_near">ליד</string>
|
||||
<string name="shared_string_undo_all">ביטול הכל</string>
|
||||
<string name="rec_split">פיצול הקלטות</string>
|
||||
<string name="rec_split_title">שימוש בפיצול הקלטות</string>
|
||||
<string name="rec_split_desc">דרוס סרטונים קיימים אם המקום הנדרש עולה על כמות המקום המוקצה</string>
|
||||
<string name="rec_split_storage_size">הקצאת מקום</string>
|
||||
<string name="no_address_found">לא נקבעה כתובת</string>
|
||||
<string name="shared_string_hide">הסתרה</string>
|
||||
<string name="av_video_quality_low">איכות וידאו נמוכה</string>
|
||||
<string name="av_video_quality_high">איכות וידאו גבוהה</string>
|
||||
<string name="av_video_quality">איכות וידאו</string>
|
||||
<string name="av_video_quality_descr">בחירה רמת האיכות לוידאו</string>
|
||||
<string name="av_audio_format">פורמט שמע</string>
|
||||
<string name="av_audio_format_descr">בחירת הפורמט להקלטת שמע</string>
|
||||
<string name="av_audio_bitrate">קצב סיביות להקלטת שמע</string>
|
||||
<string name="av_audio_bitrate_descr">בחירת קצב הסיביות להקלטת שמע</string>
|
||||
<string name="please_specify_poi_type_only_from_list">נא לבחור את סוג נקודת העניין מהרשימה</string>
|
||||
<string name="access_from_map_description">כפתור התפריט מציג את לוח המחוונים ולא את התפריט</string>
|
||||
<string name="access_from_map">גישה מתצוגת המפה</string>
|
||||
<string name="show_on_start_description">במצב כבוי תוצג המפה מיד עם הכניסה ליישום</string>
|
||||
<string name="show_on_start">תצוגה בכניסה ליישום</string>
|
||||
</resources>
|
||||
|
|
|
@ -2077,4 +2077,9 @@
|
|||
<string name="select_month_and_country">Ischerta mese e istadu</string>
|
||||
<string name="shared_string_type">Casta</string>
|
||||
<string name="starting_point">Puntu de incumintzu</string>
|
||||
<string name="item_deleted">Elementu burradu</string>
|
||||
<string name="n_items_deleted">elementos burrados</string>
|
||||
<string name="shared_string_undo_all">ANNUDDA TOTU</string>
|
||||
<string name="rec_split">Intervallu de registratzione</string>
|
||||
<string name="rec_split_title">Imprea un’intervallu de registratzione</string>
|
||||
</resources>
|
||||
|
|
|
@ -35,6 +35,7 @@ import net.osmand.plus.views.ContextMenuLayer;
|
|||
import net.osmand.plus.views.DownloadedRegionsLayer;
|
||||
import net.osmand.plus.views.FavoritesLayer;
|
||||
import net.osmand.plus.views.GPXLayer;
|
||||
import net.osmand.plus.views.ImpassableRoadsLayer;
|
||||
import net.osmand.plus.views.MapControlsLayer;
|
||||
import net.osmand.plus.views.MapInfoLayer;
|
||||
import net.osmand.plus.views.MapTextLayer;
|
||||
|
@ -71,6 +72,7 @@ public class MapActivityLayers {
|
|||
private TransportInfoLayer transportInfoLayer;
|
||||
private PointLocationLayer locationLayer;
|
||||
private PointNavigationLayer navigationLayer;
|
||||
private ImpassableRoadsLayer impassableRoadsLayer;
|
||||
private MapInfoLayer mapInfoLayer;
|
||||
private MapTextLayer mapTextLayer;
|
||||
private ContextMenuLayer contextMenuLayer;
|
||||
|
@ -79,7 +81,7 @@ public class MapActivityLayers {
|
|||
private MapWidgetRegistry mapWidgetRegistry;
|
||||
|
||||
private StateChangedListener<Integer> transparencyListener;
|
||||
|
||||
|
||||
public MapActivityLayers(MapActivity activity) {
|
||||
this.activity = activity;
|
||||
this.mapWidgetRegistry = new MapWidgetRegistry(activity.getMyApplication().getSettings());
|
||||
|
@ -141,6 +143,9 @@ public class MapActivityLayers {
|
|||
// 7. point navigation layer
|
||||
navigationLayer = new PointNavigationLayer(activity);
|
||||
mapView.addLayer(navigationLayer, 7);
|
||||
// 7.5 Impassible roads
|
||||
impassableRoadsLayer = new ImpassableRoadsLayer(activity);
|
||||
mapView.addLayer(impassableRoadsLayer, 7.5f);
|
||||
// 8. context menu layer
|
||||
contextMenuLayer = new ContextMenuLayer(activity);
|
||||
mapView.addLayer(contextMenuLayer, 8);
|
||||
|
@ -421,7 +426,11 @@ public class MapActivityLayers {
|
|||
public PointNavigationLayer getNavigationLayer() {
|
||||
return navigationLayer;
|
||||
}
|
||||
|
||||
|
||||
public ImpassableRoadsLayer getImpassableRoadsLayer() {
|
||||
return impassableRoadsLayer;
|
||||
}
|
||||
|
||||
public GPXLayer getGpxLayer() {
|
||||
return gpxLayer;
|
||||
}
|
||||
|
|
|
@ -144,7 +144,7 @@ public class AvoidSpecificRoads {
|
|||
});
|
||||
}
|
||||
private void findRoad(final MapActivity activity, final LatLon loc) {
|
||||
Location ll = new Location("");
|
||||
final Location ll = new Location("");
|
||||
ll.setLatitude(loc.getLatitude());
|
||||
ll.setLongitude(loc.getLongitude());
|
||||
app.getLocationProvider().getRouteSegment(ll, new ResultMatcher<RouteDataObject>() {
|
||||
|
@ -154,7 +154,7 @@ public class AvoidSpecificRoads {
|
|||
if(object == null) {
|
||||
Toast.makeText(activity, R.string.error_avoid_specific_road, Toast.LENGTH_LONG).show();
|
||||
} else {
|
||||
getBuilder().addImpassableRoad(object);
|
||||
getBuilder().addImpassableRoad(object, ll);
|
||||
RoutingHelper rh = app.getRoutingHelper();
|
||||
if(rh.isRouteCalculated() || rh.isRouteBeingCalculated()) {
|
||||
rh.recalculateRouteDueToSettingsChange();
|
||||
|
|
|
@ -4,6 +4,7 @@ import android.graphics.drawable.Drawable;
|
|||
import android.view.View;
|
||||
import android.widget.LinearLayout;
|
||||
|
||||
import net.osmand.binary.RouteDataObject;
|
||||
import net.osmand.data.Amenity;
|
||||
import net.osmand.data.FavouritePoint;
|
||||
import net.osmand.data.LatLon;
|
||||
|
@ -21,6 +22,7 @@ import net.osmand.plus.mapcontextmenu.controllers.AmenityMenuController;
|
|||
import net.osmand.plus.mapcontextmenu.controllers.FavouritePointMenuController;
|
||||
import net.osmand.plus.mapcontextmenu.controllers.GpxItemMenuController;
|
||||
import net.osmand.plus.mapcontextmenu.controllers.HistoryMenuController;
|
||||
import net.osmand.plus.mapcontextmenu.controllers.ImpassibleRoadsMenuController;
|
||||
import net.osmand.plus.mapcontextmenu.controllers.MapDataMenuController;
|
||||
import net.osmand.plus.mapcontextmenu.controllers.MyLocationMenuController;
|
||||
import net.osmand.plus.mapcontextmenu.controllers.PointDescriptionMenuController;
|
||||
|
@ -105,6 +107,9 @@ public abstract class MenuController extends BaseMenuController {
|
|||
} else if (pointDescription.isMyLocation()) {
|
||||
menuController = new MyLocationMenuController(app, mapActivity, pointDescription);
|
||||
}
|
||||
} else if (object instanceof RouteDataObject) {
|
||||
menuController = new ImpassibleRoadsMenuController(app, mapActivity,
|
||||
pointDescription, (RouteDataObject) object);
|
||||
}
|
||||
}
|
||||
if (menuController == null) {
|
||||
|
|
|
@ -0,0 +1,52 @@
|
|||
package net.osmand.plus.mapcontextmenu.controllers;
|
||||
|
||||
import android.graphics.drawable.Drawable;
|
||||
|
||||
import net.osmand.binary.RouteDataObject;
|
||||
import net.osmand.data.PointDescription;
|
||||
import net.osmand.plus.OsmandApplication;
|
||||
import net.osmand.plus.R;
|
||||
import net.osmand.plus.activities.MapActivity;
|
||||
import net.osmand.plus.mapcontextmenu.MenuBuilder;
|
||||
import net.osmand.plus.mapcontextmenu.MenuController;
|
||||
import net.osmand.plus.routing.RoutingHelper;
|
||||
|
||||
public class ImpassibleRoadsMenuController extends MenuController {
|
||||
|
||||
private RouteDataObject route;
|
||||
|
||||
public ImpassibleRoadsMenuController(final OsmandApplication app, final MapActivity mapActivity,
|
||||
PointDescription pointDescription, RouteDataObject route) {
|
||||
super(new MenuBuilder(app), pointDescription, mapActivity);
|
||||
this.route = route;
|
||||
rightTitleButtonController = new TitleButtonController() {
|
||||
@Override
|
||||
public void buttonPressed() {
|
||||
app.getDefaultRoutingConfig().removeImpassableRoad(
|
||||
ImpassibleRoadsMenuController.this.route);
|
||||
RoutingHelper rh = app.getRoutingHelper();
|
||||
if (rh.isRouteCalculated() || rh.isRouteBeingCalculated()) {
|
||||
rh.recalculateRouteDueToSettingsChange();
|
||||
}
|
||||
getMapActivity().getContextMenu().close();
|
||||
}
|
||||
};
|
||||
rightTitleButtonController.caption = getMapActivity().getString(R.string.shared_string_delete);
|
||||
rightTitleButtonController.leftIconId = R.drawable.ic_action_delete_dark;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setObject(Object object) {
|
||||
route = (RouteDataObject) object;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTypeStr() {
|
||||
return getMapActivity().getString(R.string.road_blocked);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Drawable getLeftIcon() {
|
||||
return getMapActivity().getResources().getDrawable(R.drawable.ic_action_road_works_dark);
|
||||
}
|
||||
}
|
165
OsmAnd/src/net/osmand/plus/views/ImpassableRoadsLayer.java
Normal file
165
OsmAnd/src/net/osmand/plus/views/ImpassableRoadsLayer.java
Normal file
|
@ -0,0 +1,165 @@
|
|||
package net.osmand.plus.views;
|
||||
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Paint;
|
||||
import android.graphics.PointF;
|
||||
|
||||
import net.osmand.Location;
|
||||
import net.osmand.binary.RouteDataObject;
|
||||
import net.osmand.data.LatLon;
|
||||
import net.osmand.data.PointDescription;
|
||||
import net.osmand.data.RotatedTileBox;
|
||||
import net.osmand.plus.R;
|
||||
import net.osmand.plus.activities.MapActivity;
|
||||
import net.osmand.plus.osmedit.OpenstreetmapPoint;
|
||||
import net.osmand.plus.osmedit.OsmEditingPlugin;
|
||||
import net.osmand.plus.osmedit.OsmNotesPoint;
|
||||
import net.osmand.plus.osmedit.OsmPoint;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class ImpassableRoadsLayer extends OsmandMapLayer implements ContextMenuLayer.IContextMenuProvider {
|
||||
|
||||
private static final int startZoom = 10;
|
||||
private final MapActivity activity;
|
||||
private Bitmap roadWorkIcon;
|
||||
private OsmandMapTileView view;
|
||||
private Paint paint;
|
||||
private Map<Long, Location> missingRoadLocations;
|
||||
private List<RouteDataObject> missingRoads;
|
||||
|
||||
public ImpassableRoadsLayer(MapActivity activity) {
|
||||
this.activity = activity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initLayer(OsmandMapTileView view) {
|
||||
this.view = view;
|
||||
roadWorkIcon = BitmapFactory.decodeResource(view.getResources(), R.drawable.ic_action_road_works_dark);
|
||||
paint = new Paint();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDraw(Canvas canvas, RotatedTileBox tileBox, DrawSettings settings) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPrepareBufferImage(Canvas canvas, RotatedTileBox tileBox, DrawSettings settings) {
|
||||
if (tileBox.getZoom() >= startZoom) {
|
||||
for (long id : getMissingRoadLocations().keySet()) {
|
||||
Location location = getMissingRoadLocations().get(id);
|
||||
float x = tileBox.getPixXFromLatLon(location.getLatitude(), location.getLongitude());
|
||||
float y = tileBox.getPixYFromLatLon(location.getLatitude(), location.getLongitude());
|
||||
float left = x - roadWorkIcon.getWidth() / 2;
|
||||
float top = y - roadWorkIcon.getHeight() / 2;
|
||||
canvas.drawBitmap(roadWorkIcon, left, top, paint);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public Map<Long, Location> getMissingRoadLocations() {
|
||||
if(missingRoadLocations == null) {
|
||||
missingRoadLocations = activity.getMyApplication().getDefaultRoutingConfig().getImpassableRoadLocations();
|
||||
}
|
||||
return missingRoadLocations;
|
||||
}
|
||||
|
||||
public List<RouteDataObject> getMissingRoads() {
|
||||
if(missingRoads == null) {
|
||||
missingRoads = activity.getMyApplication().getDefaultRoutingConfig().getImpassableRoads();
|
||||
}
|
||||
return missingRoads;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void destroyLayer() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean drawInScreenPixels() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public int getRadiusPoi(RotatedTileBox tb){
|
||||
int r = 0;
|
||||
if(tb.getZoom() < startZoom){
|
||||
r = 0;
|
||||
} else {
|
||||
r = 15;
|
||||
}
|
||||
return (int) (r * tb.getDensity());
|
||||
}
|
||||
|
||||
private boolean calculateBelongs(int ex, int ey, int objx, int objy, int radius) {
|
||||
return Math.abs(objx - ex) <= radius && (ey - objy) <= radius / 2 && (objy - ey) <= 3 * radius ;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean disableSingleTap() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean disableLongPressOnMap() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void collectObjectsFromPoint(PointF point, RotatedTileBox tileBox, List<Object> o) {
|
||||
int ex = (int) point.x;
|
||||
int ey = (int) point.y;
|
||||
int compare = getRadiusPoi(tileBox);
|
||||
int radius = compare * 3 / 2;
|
||||
|
||||
for (RouteDataObject road : getMissingRoads()) {
|
||||
Location location = getMissingRoadLocations().get(road.getId());
|
||||
int x = (int) tileBox.getPixXFromLatLon(location.getLatitude(), location.getLongitude());
|
||||
int y = (int) tileBox.getPixYFromLatLon(location.getLatitude(), location.getLongitude());
|
||||
if (calculateBelongs(ex, ey, x, y, compare)) {
|
||||
compare = radius;
|
||||
o.add(road);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public LatLon getObjectLocation(Object o) {
|
||||
if (o instanceof OsmPoint) {
|
||||
return new LatLon(((OsmPoint)o).getLatitude(),((OsmPoint)o).getLongitude());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getObjectDescription(Object o) {
|
||||
if(o instanceof OsmPoint) {
|
||||
OsmPoint point = (OsmPoint) o;
|
||||
return OsmEditingPlugin.getEditName(point);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PointDescription getObjectName(Object o) {
|
||||
if(o instanceof OsmPoint) {
|
||||
OsmPoint point = (OsmPoint) o;
|
||||
String name = "";
|
||||
String type = "";
|
||||
if (point.getGroup() == OsmPoint.Group.POI){
|
||||
name = ((OpenstreetmapPoint) point).getName();
|
||||
type = PointDescription.POINT_TYPE_OSM_NOTE;
|
||||
} else if (point.getGroup() == OsmPoint.Group.BUG) {
|
||||
name = ((OsmNotesPoint) point).getText();
|
||||
type = PointDescription.POINT_TYPE_OSM_BUG;
|
||||
}
|
||||
return new PointDescription(type, name);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in a new issue