fix renderer

git-svn-id: https://osmand.googlecode.com/svn/trunk@491 e29c36b1-1cfa-d876-8d93-3434fc2bb7b8
This commit is contained in:
Victor Shcherb 2010-09-07 11:24:13 +00:00
parent c3472fcee1
commit c82888e19f
16 changed files with 635 additions and 88 deletions

View file

@ -38,6 +38,7 @@ public class ToDoConstants {
// + 12! When switch to map check that indexes were loaded !!
// + 14. Rotate vector map
// 15. Draw layers -> icons -> text. See intersects of double streets.
// 16. Internet access bits
// 11. Move JUnidecode on client save space for some indexes adn
// 12. Fix : find proper location for streets ! centralize them (when create index)?

View file

@ -54,18 +54,22 @@ public class MapRenderObject {
int order = -1;
if((type & MapRenderingTypes.TYPE_MASK) == MapRenderingTypes.POLYGON_TYPE){
if(MapRenderingTypes.isPolygonBuilding(type)){
order = 34;
order = 64;
} else {
order = 1;
}
} else if((type & MapRenderingTypes.TYPE_MASK) == MapRenderingTypes.POLYLINE_TYPE){
if(MapRenderingTypes.isHighway(type)){
order = 32 - MapRenderingTypes.getHighwayType(type) + 1;
} else {
order = 2;
int oType = MapRenderingTypes.getObjectType(type);
int sType = MapRenderingTypes.getPolylineSubType(type);
if(oType == MapRenderingTypes.HIGHWAY){
order = 32 - sType + 24;
} else if(oType == MapRenderingTypes.RAILWAY){
order = 58;
} else if(oType == MapRenderingTypes.WATERWAY){
order = 18;
}
} else {
order = 64;
order = 128;
}
return order;
}

View file

@ -51,10 +51,10 @@ public class MapRenderingTypes {
public final static int MASK_4 = (1 << 4) - 1;
public final static int MASK_10 = (1 << 10) - 1;
public final static int HIGHWAY = 1; // TODO cycleways?
public final static int BARRIER = 2; //TODO
public final static int WATERWAY = 3; //TODO
public final static int RAILWAY = 4; //TODO
public final static int HIGHWAY = 1;
public final static int BARRIER = 2;
public final static int WATERWAY = 3;
public final static int RAILWAY = 4;
public final static int AEROWAY = 5;
public final static int AERIALWAY = 6;
public final static int POWER = 7;
@ -63,20 +63,20 @@ public class MapRenderingTypes {
public final static int OFFICE = 10;
public final static int SHOP = 11;
public final static int EMERGENCY = 12;
public final static int TOURISM = 13;
public final static int TOURISM = 13; //+R TODO zoo, attractions
public final static int HISTORIC = 14;
public final static int LANDUSE = 15;
public final static int MILITARY = 16;
public final static int NATURAL = 17;
public final static int AMENITY_SUSTENANCE = 18;
public final static int AMENITY_EDUCATION = 19;
public final static int AMENITY_TRANSPORTATION = 20;
public final static int AMENITY_FINANCE = 21;
public final static int AMENITY_HEALTHCARE = 22;
public final static int AMENITY_ENTERTAINMENT = 23;
public final static int AMENITY_OTHER = 24;
public final static int ADMINISTRATIVE = 25; //TODO area, tag=place
public final static int ROUTE = 26; //TODO area
public final static int AMENITY_SUSTENANCE = 18; //+R
public final static int AMENITY_EDUCATION = 19; //+R
public final static int AMENITY_TRANSPORTATION = 20; //+R
public final static int AMENITY_FINANCE = 21; //+R
public final static int AMENITY_HEALTHCARE = 22; //+R
public final static int AMENITY_ENTERTAINMENT = 23;//+R
public final static int AMENITY_OTHER = 24; //+R
public final static int ADMINISTRATIVE = 25;
public final static int ROUTE = 26; //NOT DONE YET
public final static int SPORT = 27;
@ -112,6 +112,7 @@ public class MapRenderingTypes {
public final static int PL_HW_LIVING_STREET = 11;
public final static int PL_HW_PEDESTRIAN = 16;
public final static int PL_HW_CYCLEWAY = 17;
public final static int PL_HW_BYWAY = 18;
public final static int PL_HW_FOOTWAY = 19;
@ -160,19 +161,7 @@ public class MapRenderingTypes {
type = type >> OBJ_TYPE_MASK_LEN;
return (type & PG_SUBTYPE_MASK) == SUBTYPE_BUILDING;
}
public static boolean isHighway(int type){
if((type & TYPE_MASK) != POLYLINE_TYPE){
return false;
}
type = type >> TYPE_MASK_LEN;
return (type & OBJ_TYPE_MASK) == HIGHWAY;
}
public static int getHighwayType(int type){
return (type >> (TYPE_MASK_LEN + OBJ_TYPE_MASK_LEN)) & PL_SUBTYPE_MASK;
}
// stored information to convert from osm tags to int type
private static Map<String, MapRulType> types = null;
@ -344,9 +333,7 @@ public class MapRenderingTypes {
public static String getEntityName(Entity e){
String name = e.getTag(OSMTagKey.NAME);
if(name == null){
if(e.getTag(OSMTagKey.BUILDING) != null){
name = e.getTag(OSMTagKey.ADDR_HOUSE_NUMBER);
}
name = e.getTag(OSMTagKey.ADDR_HOUSE_NUMBER);
}
return name;
}
@ -432,7 +419,7 @@ public class MapRenderingTypes {
register("highway", "living_street", HIGHWAY, PL_HW_LIVING_STREET, POLYLINE_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("highway", "service", HIGHWAY, PL_HW_SERVICE, POLYLINE_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("highway", "track", HIGHWAY, PL_HW_TRACK, POLYLINE_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("highway", "pedestrian", HIGHWAY, PL_HW_FOOTWAY, POLYLINE_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("highway", "pedestrian", HIGHWAY, PL_HW_PEDESTRIAN, POLYLINE_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
// register("highway", "raceway", HIGHWAY, PL_HW_RACEWAY, POLYLINE_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("highway", "services", HIGHWAY, PL_HW_SERVICES, POLYGON_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
@ -467,8 +454,69 @@ public class MapRenderingTypes {
register("traffic_calming", "rumble_strip", HIGHWAY, 55, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("traffic_calming", "table", HIGHWAY, 56, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("traffic_calming", "choker", HIGHWAY, 57, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("traffic_calming", null, HIGHWAY, 58, POINT_TYPE); //$NON-NLS-1$
register("traffic_calming", null, HIGHWAY, 58, POINT_TYPE); //$NON-NLS-1$
// 2. barrier
register("barrier", "hedge", BARRIER, 1, POLYLINE_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("barrier", "fence", BARRIER, 2, POLYLINE_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("barrier", "wall", BARRIER, 3, POLYLINE_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("barrier", "ditch", BARRIER, 1, POLYLINE_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("barrier", "retaining_wall", BARRIER, 4, POLYLINE_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("barrier", "city_wall", BARRIER, 5, POLYLINE_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("barrier", "bollard", BARRIER, 6, POLYLINE_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("barrier", "cycle_barrier", BARRIER, 16, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("barrier", "block", BARRIER, 17, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("barrier", "cattle_grid", BARRIER, 18, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("barrier", "toll_booth", BARRIER, 19, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("barrier", "entrance", BARRIER, 20, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("barrier", "gate", BARRIER, 21, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("barrier", "lift_gate", BARRIER, 22, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("barrier", "stile", BARRIER, 23, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("barrier", "horse_stile", BARRIER, 24, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("barrier", "kissing_gate", BARRIER, 25, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("barrier", "sally_port", BARRIER, 26, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("barrier", "turnstile", BARRIER, 27, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("barrier", "kent_carriage_gap", BARRIER, 28, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
// 3. waterway
register("waterway", "stream", WATERWAY, 1, POLYLINE_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("waterway", "river", WATERWAY, 2, POLYLINE_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("waterway", "riverbank", WATERWAY, 3, POLYGON_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("waterway", "canal", WATERWAY, 4, POLYLINE_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("waterway", "ditch", WATERWAY, 5, POLYLINE_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("waterway", "drain", WATERWAY, 6, POLYLINE_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("waterway", "dock", WATERWAY, 7, POLYGON_WITH_CENTER_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("waterway", "lock_gate", WATERWAY, 8, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("waterway", "turning_point", WATERWAY, 9, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("waterway", "boatyard", WATERWAY, 10, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("waterway", "weir", WATERWAY, 11, POLYLINE_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("waterway", "dam", WATERWAY, 12, POLYLINE_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
// 4. railway
register("railway", "rail", RAILWAY, 1, POLYLINE_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("railway", "tram", RAILWAY, 2, POLYLINE_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("railway", "light_rail", RAILWAY, 3, POLYLINE_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("railway", "abandoned", RAILWAY, 4, POLYLINE_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("railway", "disused", RAILWAY, 5, POLYLINE_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("railway", "subway", RAILWAY, 6, POLYLINE_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("railway", "preserved", RAILWAY, 7, POLYLINE_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("railway", "narrow_gauge", RAILWAY, 8, POLYLINE_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("railway", "construction", RAILWAY, 9, POLYLINE_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("railway", "monorail", RAILWAY, 10, POLYLINE_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("railway", "funicular", RAILWAY, 11, POLYLINE_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("railway", "platform", RAILWAY, 12, POLYLINE_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("railway", "station", RAILWAY, 13, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("railway", "turntable", RAILWAY, 14, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("railway", "halt", RAILWAY, 22, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("railway", "tram_stop", RAILWAY, 23, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("railway", "crossing", RAILWAY, 24, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("railway", "level_crossing", RAILWAY, 25, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("railway", "subway_entrance", RAILWAY, 26, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("railway", "buffer_stop", RAILWAY, 27, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
// 5. aeroway
register("aeroway", "aerodrome", AEROWAY, 1, POLYGON_WITH_CENTER_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("aeroway", "terminal", AEROWAY, 2, POLYGON_WITH_CENTER_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
@ -840,7 +888,30 @@ public class MapRenderingTypes {
register("amenity", "bench", AMENITY_OTHER, 24, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("amenity", "clock", AMENITY_OTHER, 25, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
// 25. administrative
register("place", "continent", ADMINISTRATIVE, 1, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("place", "country", ADMINISTRATIVE, 2, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("place", "state", ADMINISTRATIVE, 3, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("place", "region", ADMINISTRATIVE, 4, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("place", "county", ADMINISTRATIVE, 5, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("place", "city", ADMINISTRATIVE, 6, POINT_TYPE, POLYGON_WITH_CENTER_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("place", "town", ADMINISTRATIVE, 7, POINT_TYPE, POLYGON_WITH_CENTER_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("place", "village", ADMINISTRATIVE, 8, POINT_TYPE, POLYGON_WITH_CENTER_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("place", "hamlet", ADMINISTRATIVE, 9, POINT_TYPE, POLYGON_WITH_CENTER_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("place", "suburb", ADMINISTRATIVE, 10, POINT_TYPE, POLYGON_WITH_CENTER_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("place", "locality", ADMINISTRATIVE, 11, POINT_TYPE, POLYGON_WITH_CENTER_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("place", "island", ADMINISTRATIVE, 12, POINT_TYPE, POLYGON_WITH_CENTER_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("boundary", "administrative", ADMINISTRATIVE, 15, POLYLINE_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("boundary", "civil", ADMINISTRATIVE, 16, POLYLINE_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("boundary", "political", ADMINISTRATIVE, 17, POLYLINE_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("boundary", "maritime", ADMINISTRATIVE, 18, POLYLINE_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("boundary", "national_park", ADMINISTRATIVE, 19, POLYLINE_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("boundary", "protected_area", ADMINISTRATIVE, 20, POLYLINE_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("addr:housenumber", null, ADMINISTRATIVE, 21, POINT_TYPE); //$NON-NLS-1$
// 27. sport
register("sport", "9pin", SPORT, 1, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("sport", "10pin", SPORT, 2, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$

Binary file not shown.

After

Width:  |  Height:  |  Size: 565 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 517 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 486 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 791 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 503 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 539 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 368 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 311 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 785 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 636 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 B

View file

@ -0,0 +1,376 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="transport_context_menu">Cercare un trasporto pubblico all\'arrivo</string>
<string name="point_on_map">Punto sulla mappa\n Lat {0,number,#.####} Lon {1,number,#.####}</string>
<string name="osb_bug_name">Bug</string>
<string name="poi_context_menu_modify">Modificare POI</string>
<string name="poi_context_menu_delete">Eliminare POI</string>
<string name="rotate_map_compass_opt">Con bussola</string>
<string name="rotate_map_bearing_opt">In direzione del movimento</string>
<string name="rotate_map_none_opt">Nessuna rotazione</string>
<string name="rotate_map_to_bearing_descr">Selezionare il metodo per ruotare la mappa</string>
<string name="rotate_map_to_bearing">Ruotare la mappa</string>
<string name="show_route">Mostrare il percorso</string>
<string name="fav_imported_sucessfully">Importazione dei favoriti riuscita</string>
<string name="fav_file_to_load_not_found">Il file GPX per importare i favoriti non è stato trovato in {0}</string>
<string name="fav_saved_sucessfully">Favoriti salvati con successo in {0}</string>
<string name="no_fav_to_save">Nessun favorito da salvare</string>
<string name="import_fav">Importare</string>
<string name="export_fav">Esportare</string>
<string name="error_occurred_loading_gpx">Errore durante il caricamento del file gpx</string>
<string name="send_report">Inviare rapporto</string>
<string name="none_region_found">Non è stata trovata nessuna regione sulla scheda SD. Provare a scaricare una regione da internet.</string>
<string name="poi_namefinder_query_empty">Inserire i parametri di ricerca per trovare un POI</string>
<string name="any_poi">Qualsiasi</string>
<string name="layer_transport_route">Percorso di trasporto pubblico</string>
<string name="thanks_yandex_traffic">Grazie a Yandex che hanno fornito le informazioni sul traffico.</string>
<string name="layer_yandex_traffic">Yandex (traffico)</string>
<string name="layer_route">Percorso</string>
<string name="layer_favorites">Favoriti</string>
<string name="layer_osm_bugs">Bug Osm</string>
<string name="layer_transport">Fermata trasporto pubblico</string>
<string name="layer_poi">POI</string>
<string name="layer_map">Tipo Mappa</string>
<string name="menu_layers">Strati</string>
<string name="continue_follow_previous_route">Percorso incompleto. Continuare a seguirlo? </string>
<string name="context_menu_item_search_poi">Cercare POI</string>
<string name="context_menu_item_show_route">Percorso da</string>
<string name="use_trackball_descr">Utilizzare la trackball per muovere la mappa</string>
<string name="use_trackball">Usa la trackball</string>
<string name="background_service_wait_int_descr">Scegliere l\'intervallo di tempo per determinare la posizione</string>
<string name="background_service_wait_int">Intervallo di attesa</string>
<string name="service_stop_background_service">Spegnere il servizio di navigazione in background</string>
<string name="where_am_i">La mia posizione?</string>
<string name="process_navigation_service">Servizio di navigazione OsmAnd</string>
<string name="network_provider">Rete</string>
<string name="gps_provider">GPS</string>
<string name="int_seconds">secondi</string>
<string name="int_min">min.</string>
<string name="background_service_int_descr">Scegliere l\'intervallo di tempo per determinare la posizione per il servizio di navigazione in background</string>
<string name="background_service_int">Intervallo di posizionamento</string>
<string name="background_service_provider_descr">Scegliere il provider per il servizio in background</string>
<string name="background_service_provider">Provider di posizionamento</string>
<string name="background_router_service_descr">Abilitare il servizio in background per il tracciamento della posizione sul lungo periodo</string>
<string name="background_router_service">Servizio di ricerca percorso</string>
<string name="off_router_service_no_gps_available">Il servizio in background OsmAnd di generazione percorso necessita del sistema di posizionamento attivato.</string>
<string name="routing_settings_descr">Specificare le opzioni di percorso</string>
<string name="routing_settings">Generazione percorso</string>
<string name="hide_poi_filter">Nascondere il filtro</string>
<string name="show_poi_filter">Mostrare il filtro</string>
<string name="search_poi_filter">Filtro</string>
<string name="menu_mute_off">Attivare voce</string>
<string name="menu_mute_on">Disattivare voce</string>
<string name="voice_not_use">Non utilizzato</string>
<string name="voice_provider_descr">Scegliere la voce per il percorso</string>
<string name="voice_provider">Dati voce</string>
<string name="voice_data_initializing">Dati voce in preparazione...</string>
<string name="voice_data_not_supported">La versione dei dati vocali differisce dalla versione supportata dall\'applicazione</string>
<string name="voice_data_corrupted">I dati voce specificati sono rovinati</string>
<string name="voice_data_unavailable">Dati voce non disponibili</string>
<string name="stop_routing">Stop generazione percorso</string>
<string name="sd_unmounted">SD card attualmente non accessibile. \nImpossibile vedere mappe e cercare alcunche\'.</string>
<string name="sd_mounted_ro">SD card attualmente accessibile in sola lettura. \nImpossibile effettuare download da internet e solo le mappe precaricate sono visibili.</string>
<string name="unzipping_file">File in decompressione</string>
<string name="route_tr">Svoltare a destra e continuare</string>
<string name="route_tshr">Svoltare stretto a destra e continuare</string>
<string name="route_tslr">Svoltare leggermente a destra e continuare</string>
<string name="route_tl">Svoltare a sinistra e continuare</string>
<string name="route_tshl">Svoltare stretto a sinistra e continuare</string>
<string name="route_tsll">Svoltare leggermente a sinistra e continuare</string>
<string name="route_tu">Fare inversione a U e continuare</string>
<string name="route_head">Andare</string>
<string name="first_time_continue">Continuare</string>
<string name="first_time_download">Download indici</string>
<string name="first_time_msg">Grazie per aver scelto OsmAnd. \nPer utilizzare tutte le caratteristiche dell\'applicazione sono necessari i file di indice, che possono essere scaricati (Impostazioni/Dati) o creati da voi. Sara\' poi possibile :cercare indirizzi, POI, trasporti pubblici.</string>
<string name="search_poi_location">Ricerca posizione POI...</string>
<string name="search_near_map">Ricerca vicino all\'ultima posizione sulla mappa</string>
<string name="search_nearby">Ricerca vicino</string>
<string name="map_orientation_default">Default</string>
<string name="map_orientation_portrait">verticale</string>
<string name="map_orientation_landscape">Orizzontale</string>
<string name="map_screen_orientation">Orientamento dello schermo mappa</string>
<string name="map_screen_orientation_descr">Scegliere l\'orientamento dello schermo</string>
<string name="opening_hours_not_supported">Il formato dell\'ora di apertura non è supportato per la modifica</string>
<string name="add_new_rule">Aggiungere una nuova regola</string>
<string name="transport_Routes">Percorsi</string>
<string name="transport_Stop">Fermata</string>
<string name="transport_stops">fermate</string>
<string name="transport_searching_transport">Ricerca trasporto pubblico (senza destinazione)</string>
<string name="transport_searching_route">Ricerca di {0} percorso(i)</string>
<string name="transport_search_none">nessuno</string>
<string name="transport_search_after">Ricerca percorso dopo</string>
<string name="transport_search_before">Ricerca percorso prima</string>
<string name="transport_finish_search">Completare la ricerca</string>
<string name="transport_stop_to_go_out">Scegliere la fermata per uscire</string>
<string name="transport_to_go_after">per andare dopo</string>
<string name="transport_to_go_before">per andare prima</string>
<string name="transport_stops_to_pass">fermata da passare</string>
<string name="transport_route_distance">Distanza percorso</string>
<string name="transport">Trasporto pubblico</string>
<string name="default_buttons_ok">OK</string>
<string name="show_transport_over_map_description">Visualizzare le fermate di trasporto pubblico sulla mappa</string>
<string name="show_transport_over_map">Visualizza le fermate</string>
<string name="hello">Applicazione di navigazione OsmAnd</string>
<string name="update_poi_success">I dati POI sono stati aggiornati ({0} caricati)</string>
<string name="update_poi_error_local">Errore nell\'aggiornamento delgi indici locali</string>
<string name="update_poi_error_loading">Errore durante il caricamento dati dal server</string>
<string name="update_poi_no_offline_poi_index">Non ci sono indici POI per questa zona</string>
<string name="update_poi_is_not_available_for_zoom">L\'aggiornamento POI non è disponibile a questo zoom</string>
<string name="context_menu_item_update_poi">Aggiornare POI</string>
<string name="context_menu_item_update_map_confirm">Siete si curi di aggiornale i dati locale via internet?</string>
<string name="search_history_city">Città : {0}</string>
<string name="search_history_street">Strada : {0}, {1}</string>
<string name="search_history_int_streets">Incrocio : {0} x {1} in {2}</string>
<string name="search_history_building">Edificio : {0}, {1}, {2}</string>
<string name="search_history_navigate_to">Naviga verso lat = {0}, lon = {1}</string>
<string name="favorite">Favorito</string>
<string name="clear_all">Eliminare tutto</string>
<string name="history">Storia</string>
<string name="uploading_data">Invio dati...</string>
<string name="uploading">Invio</string>
<string name="search_nothing_found">Trovato nulla</string>
<string name="searching">Ricerca</string>
<string name="searching_address">Ricerca indirizzo...</string>
<string name="search_osm_nominatim">Ricerca indirizzo con Osm Nominatim</string>
<string name="hint_search_online">Numero civico, strada, città</string>
<string name="search_offline_address">Offline</string>
<string name="search_online_address">Internet</string>
<string name="max_level_download_tile">Max livello di zoom</string>
<string name="max_level_download_tile_descr">Scegliere il massimo livello di zoom usando internet</string>
<string name="route_about">Info sul percorso</string>
<string name="route_general_information">Distanza totale = {0}, tempo di viaggio = {1} h {2} m.</string>
<string name="router_service_descr">Scegliere il servizio di generazione percorso</string>
<string name="router_service">Generazione percorso</string>
<string name="sd_dir_not_accessible">Directory su SD card inaccessibile</string>
<string name="download_question">Scaricare {0} - {1} ?</string>
<string name="download_question_exist">L\'indice per {0} attualmente esistente ({1}). Aggiornare ({2}) ?</string>
<string name="address">Indirizzo</string>
<string name="download_index_success">Indice scaricato correttamente</string>
<string name="error_io_error">Errore di Input/Output.</string>
<string name="downloading_file">Ricezione file</string>
<string name="downloading">In ricezione...</string>
<string name="downloading_list_indexes">Ricezione lista indici</string>
<string name="list_index_files_was_not_loaded">I file di indice non provengono da osmand.googlecode.com.</string>
<string name="select_index_file_to_download">Se non trovate la vostra zona potete generarla da voi. Vedere osmand.net</string>
<string name="show_poi_on_map">Visualizza mappa</string>
<string name="fav_points_edited">Favorito modificato</string>
<string name="fav_points_not_exist">Favorito inesistente</string>
<string name="update_existing">Sostituire</string>
<string name="only_show">Visualizza solo</string>
<string name="follow">Seguire</string>
<string name="recalculate_route_to_your_location">Ricalcolo del percorso relativamente alla vostra posizione</string>
<string name="follow_route">Seguire il percorso</string>
<string name="mark_final_location_first">Selezionare prima un punto</string>
<string name="get_directions">Itinerari</string>
<string name="gps_status_app_not_found">Applicazione Gps status non trovata</string>
<string name="show_gps_status">Visualizzare lo stato del gps</string>
<string name="opening_hours">Orari di apertura</string>
<string name="opening_changeset">Apertura</string>
<string name="closing_changeset">Chiusura</string>
<string name="commiting_node">Invio oggetto</string>
<string name="loading_poi_obj">Caricamento poi </string>
<string name="auth_failed"> Autorizzazione fallita</string>
<string name="failed_op">fallito</string>
<string name="converting_names">Conversione nomi locali/nomi inglesi...</string>
<string name="loading_streets_buildings">Caricamento strade/edifici...</string>
<string name="loading_postcodes">Caricamento CAP...</string>
<string name="loading_streets">Caricamento strade...</string>
<string name="loading_cities">Caricamento città...</string>
<string name="loading">Caricamento</string>
<string name="poi">POI</string>
<string name="error_occurred_saving_gpx">Errore durante il salvataggio gpx</string>
<string name="error_calculating_route">Errore di calcolo percorso</string>
<string name="error_calculating_route_occured">Si è verificato un errore durante il calcolo percorso</string>
<string name="empty_route_calculated">Percorso vuoto calcolato</string>
<string name="new_route_calculated_dist">Calcolo nuovo percorso, distanza</string>
<string name="arrived_at_destination">Siete arrivati al punto di destinazione</string>
<string name="invalid_locations">Luoghi invalidi</string>
<string name="go_back_to_osmand">Ritornalre alla mappa OsmAnd</string>
<string name="close">Chiudere</string>
<string name="loading_data">Caricamento dati</string>
<string name="reading_indexes">Lettura indici...</string>
<string name="previous_run_crashed">La precedente attivazione dell\'applicazione si è interrotta.Il file di log è in {0}. Prego inserire una segnalazione allegando il file di log.</string>
<string name="saving_gpx_tracks">Salvataggio tracce gpx sulla scheda SD...</string>
<string name="finished_task">Finito</string>
<string name="reload_indexes_descr">Ricarica dei dati di indice dalla scheda SD</string>
<string name="reload_indexes">Ricarica indici</string>
<string name="download_indexes_descr">Download indici da internet</string>
<string name="download_indexes">Download indici</string>
<string name="use_online_routing_descr">Utilizzare internet per calcolare il percorso</string>
<string name="use_online_routing">Utilizzare il generatore di percorsi online</string>
<string name="user_password_descr">Inserire password osm</string>
<string name="user_password">Password utente</string>
<string name="osm_settings_descr">Specificare impostazioni osm : osm login</string>
<string name="monitor_preferences_descr">Specificare impostazioni monitor : salvare la traccia</string>
<string name="data_settings_descr">Specificare impostazioni dati : lingua, aggiorna dati</string>
<string name="map_preferences_descr">Specificare impostazioni mappa : rotazione, filtro poi</string>
<string name="data_settings">Dati</string>
<string name="osm_settings">Osm</string>
<string name="auto_zoom_map_descr">Zoom automatico relativo alla velocità</string>
<string name="auto_zoom_map">Zoom automatico mappa</string>
<string name="additional_settings">Impostazioni aggiuntive</string>
<string name="settings_preset_descr">Selezionare impostazioni predefinite</string>
<string name="settings_preset">Modo applicazione</string>
<string name="settings">Impostazioni</string>
<string name="save_current_track_descr">Salvare la traccia corrente sulla scheda SD</string>
<string name="save_current_track">Salvare la traccia corrente</string>
<string name="save_track_interval_descr">Scegliere l\'intervallo di tempo per salvare le traccie</string>
<string name="save_track_interval">Salvare intervallo traccie</string>
<string name="monitor_preferences">Monitoraggio</string>
<string name="save_track_to_gpx_descrp">Le traccie saranno salvate nella directory traccie divise per giorno</string>
<string name="save_track_to_gpx">Salva traccia in gpx</string>
<string name="navigate_to">Naviga verso</string>
<string name="update_tile">Aggiornare mappa</string>
<string name="reload_tile">Ricaricare tasselli</string>
<string name="user_name_descr">Inserire il nome utente da inviare a osm</string>
<string name="user_name">Nome utente</string>
<string name="mark_point">Obbiettivo</string>
<string name="show_osm_bugs_descr">Visualizzare errori open street sulla mappa</string>
<string name="show_osm_bugs">Visualizzare errori open street</string>
<string name="favourites_activity">Lista dei punti favoriti</string>
<string name="add_to_favourite">Aggiungere a favoriti</string>
<string name="use_english_names_descr">Selezionare l\'uso dei nomi locali o inglesi</string>
<string name="use_english_names">Utilizzare nomi inglesi</string>
<string name="app_settings">Impostazioni applicazione</string>
<string name="search_address">Cercare indirizzo</string>
<string name="choose_building">Scegliere edificio</string>
<string name="choose_street">Scegliere strada</string>
<string name="choose_city">CScegliere città</string>
<string name="ChooseCountry">Scegliere nazione</string>
<string name="position_on_map_descr">Scegliere posizione sulla mappa</string>
<string name="position_on_map">Posizione sulla mappa</string>
<string name="map_specify_point">Specificare punto</string>
<string name="show_view_angle_descr">Mostra aspetto della vista basato sulla bussola</string>
<string name="show_view_angle">Mostra aspetto della vista</string>
<string name="stop_navigation">Eliminare punto</string>
<string name="navigate_to_point">Marcare un punto</string>
<string name="map_view_3d_descr">Abilitare la vista 3D sulla mappa</string>
<string name="map_view_3d">Vista mappa 3D</string>
<string name="show_poi_over_map_description">Visualizzare POI sulla mappa (usa l\'ultimo filtro scelto)</string>
<string name="show_poi_over_map">Visualizzare POI</string>
<string name="map_tile_source_descr">Scegliere la sorgente per i tasselli : </string>
<string name="map_tile_source">Sorgente tasselli di mappa</string>
<string name="map_source">Sorgente mappa</string>
<string name="use_internet">Utilizzare internet</string>
<string name="show_location">Visualizzare luoghi</string>
<string name="map_preferences">Mappa</string>
<string name="settings_activity">Impostazioni</string>
<string name="show_gps_coordinates_text">Visualizzare coordinate gps sulla mappa</string>
<string name="use_internet_to_download_tile">Utilizzare internet per scaricare i tasselli mancanti</string>
<string name="app_name">OsmAnd</string>
<string name="app_description">Applicazione di navicazione</string>
<string name="exit_Button">Uscita</string>
<string name="map_Button">Mappa</string>
<string name="settings_Button">Impostazioni</string>
<string name="favorites_Button">Favoriti</string>
<string name="search_button">Ricerca</string>
<color name="menu_background">#FF9030</color>
<string name="search_activity">Ricerca</string>
<color name="color_white">#FFFFFF</color>
<color name="color_red">#FF0000</color>
<string name="searchpoi_activity">Scegliere POI</string>
<string name="search_POI_level_btn">Trovare ancora</string>
<string name="incremental_search_city">Ricerca della città in modo incrementale. Per cercare paesi/CAP inserire più di tre simboli.</string>
<string name="incremental_search_street">Ricerca strade in modo incrementale</string>
<string name="incremental_search_building">Ricerca edifici in modo incrementale</string>
<string name="choose_available_region">Scegliere regione dalla lista</string>
<string name="choose_intersected_street">Scegliere incrocio strade</string>
<string name="Closest_Amenities">Amenità vicine</string>
<string name="app_mode_default">Predefinito</string>
<string name="app_mode_car">Auto</string>
<string name="app_mode_bicycle">Bicicletta</string>
<string name="app_mode_pedestrian">Pedone</string>
<string name="position_on_map_center">Centro</string>
<string name="position_on_map_bottom">In basso</string>
<string name="interval_1_second">1 secondo</string>
<string name="interval_2_seconds">2 secondi</string>
<string name="interval_5_seconds">5 secondi</string>
<string name="interval_15_seconds">15 secondi</string>
<string name="interval_30_seconds">30 secondi</string>
<string name="interval_1_minute">1 minuto</string>
<string name="interval_5_minutes">5 minuti</string>
<string name="navigate_point_top_text">Inserire latitudine &amp; longitudine nel formato (G - gradi, M - minuti, S - secondi)</string>
<string name="navigate_point_latitude">Latitude</string>
<string name="navigate_point_longitude">Longitude</string>
<string name="navigate_point_format_D">GGG.GGGGG</string>
<string name="navigate_point_format_DM">GGG:MM.MMMMM</string>
<string name="navigate_point_format_DMS">GGG:MM:SS.SSSSS</string>
<string name="search_shown_on_map">Visualizzare sulla mappa</string>
<string name="navigate_point_cancel">Annulla</string>
<string name="search_address_top_text">Selezionare indirizzo</string>
<string name="search_address_region">Regione</string>
<string name="search_address_city">Città</string>
<string name="search_address_street">Strada</string>
<string name="search_address_building">Edificio</string>
<string name="search_address_building_option">Edificio</string>
<string name="search_address_street_option">Incrocio</string>
<string name="search_tabs_location">Luogo</string>
<string name="context_menu_item_navigate_point">Navigare verso il punto</string>
<string name="context_menu_item_add_favorite">Aggiungere a favoriti</string>
<string name="context_menu_item_update_map">Aggiornare la mappa</string>
<string name="context_menu_item_open_bug">Aprire un bug osm</string>
<string name="context_menu_item_create_poi">Creare un POI</string>
<string name="default_buttons_yes">Si</string>
<string name="default_buttons_cancel">Annulla</string>
<string name="default_buttons_apply">Applica</string>
<string name="default_buttons_add">Aggiungere</string>
<string name="default_buttons_no">No</string>
<string name="add_favorite_dialog_top_text">Inserire il nome del punto favorito</string>
<string name="add_favorite_dialog_default_favourite_name">Favorito</string>
<string name="add_favorite_dialog_favourite_added_template">Il punto favorito \'\'{0}\'\' è stato aggiunto.</string>
<string name="favourites_context_menu_title">Menu contestuale</string>
<string name="favourites_context_menu_navigate">Navigare verso</string>
<string name="favourites_context_menu_edit">Modifica favorito</string>
<string name="favourites_context_menu_delete">Elimina favorito</string>
<string name="favourites_edit_dialog_title">Inserire il nuovo nome per il punto favorito</string>
<string name="favourites_remove_dialog_title">Si è sicuri di voler eliminare il punto favorito?</string>
<string name="favourites_remove_dialog_success">Il punto favorito {0} è stato eliminato.</string>
<string name="osb_add_dialog_title">Inserire il testo per descrivere il bug</string>
<string name="osb_add_dialog_success">Il bug è stato creato</string>
<string name="osb_add_dialog_error">Si è verificata un\'eccezione : il bug non è stato creato</string>
<string name="osb_comment_dialog_title">Aggiungere un commento al bug</string>
<string name="osb_comment_dialog_add_button">Aggiungere commento</string>
<string name="osb_comment_dialog_success">Il commento è stato aggiunto</string>
<string name="osb_comment_dialog_error">Si è verificata un\'eccezione : cil commento non è stato aggiunto</string>
<string name="osb_close_dialog_title">Chiusura bug</string>
<string name="osb_close_dialog_close_button">Chiudere bug</string>
<string name="osb_close_dialog_success">Il bug è stato aggiunto</string>
<string name="osb_close_dialog_error">Si è verificata un\'eccezione : il bug non è stato chiuso</string>
<string name="osb_comment_menu_item">Aggiungere commento</string>
<string name="osb_close_menu_item">Chiudere bug</string>
<string name="osb_comment_dialog_message">Messaggio</string>
<string name="osb_comment_dialog_author">Nome autore</string>
<string name="poi_edit_title">Modifica POI</string>
<string name="poi_create_title">Crea POI</string>
<string name="poi_error_poi_not_found">L\'oggetto non è trovabile o l\'amenità non è un oggetto singolo</string>
<string name="poi_remove_confirm_template">Si è sicuri di voler eliminare {0} (inserire commento) ?</string>
<string name="poi_remove_title">Eleminazione POI</string>
<string name="default_buttons_delete">Eliminare</string>
<string name="poi_remove_success">POI eliminato correttamente</string>
<string name="poi_action_add">aggiungere</string>
<string name="poi_action_change">cambiare</string>
<string name="poi_action_succeded_template">Azione {0} completata.</string>
<string name="poi_error_unexpected_template">Errore inattaso durante l\'azione {0}.</string>
<string name="poi_error_io_error_template">Errore di Input/output Input/output durante l\'azione {0}.</string>
<string name="poi_error_info_not_loaded">Informazioni relative all\'oggetto non caricate</string>
<string name="poi_dialog_name">Nome</string>
<string name="poi_dialog_opening_hours">Apertura</string>
<string name="poi_dialog_comment">Commento</string>
<string name="poi_dialog_comment_default">Cambio POI</string>
<string name="poi_dialog_other_tags_message">Tutti gli altri tag sono conservati</string>
<string name="default_buttons_commit">Aggiornamento</string>
<string name="default_buttons_reset">Reset</string>
<string name="filter_current_poiButton">Filtro</string>
<string name="edit_filter_delete_menu_item">Eliminare</string>
<string name="edit_filter_save_as_menu_item">Salvare come</string>
<string name="edit_filter_delete_dialog_title">Si è sicuri di eliminare il filtro?</string>
<string name="edit_filter_delete_message">Il filtro {0} è stato eliminato</string>
<string name="edit_filter_create_message">Il filtro {0} è stato creato</string>
<string name="default_buttons_selectall">Selezionare tutto</string>
</resources>

View file

@ -51,7 +51,9 @@ public class OsmandRenderer implements Comparator<MapRenderObject> {
private int clPedestrianRoad = Color.rgb(250, 128, 115);
private PathEffect pedestrianPathEffect = new DashPathEffect(new float[]{2,2}, 1);
private PathEffect trackPathEffect = new DashPathEffect(new float[]{5,2}, 1);
private PathEffect trackPathEffect = new DashPathEffect(new float[]{6,2}, 1);
private PathEffect subwayPathEffect = new DashPathEffect(new float[]{6,3}, 1);
private PathEffect railwayPathEffect = new DashPathEffect(new float[]{7,7}, 1);
private final Context context;
@ -120,11 +122,7 @@ public class OsmandRenderer implements Comparator<MapRenderObject> {
if(obj.isPoint()){
drawPoint(obj, canvas, leftTileX, topTileY, zoom, rotate);
} else if(obj.isPolyLine()){
if(MapRenderingTypes.isHighway(obj.getType())){
drawHighway(obj, canvas, leftTileX, topTileY, zoom, rotate);
} else {
// TODO
}
drawPolyline(obj, canvas, leftTileX, topTileY, zoom, rotate);
} else {
PointF center = drawPolygon(obj, canvas, leftTileX, topTileY, zoom, rotate);
if(center != null){
@ -174,10 +172,18 @@ public class OsmandRenderer implements Comparator<MapRenderObject> {
color = Color.rgb(221, 221, 221);
}
} else if (type == MapRenderingTypes.WATERWAY) {
if(subtype == 3){
color = Color.rgb(181, 208, 208);
}
} else if (type == MapRenderingTypes.AMENITY_TRANSPORTATION) {
if (subtype == 1 || subtype == 2) {
color = Color.rgb(246, 238, 183);
}
} else if (type == MapRenderingTypes.AMENITY_ENTERTAINMENT) {
if (subtype == 3) {
color = Color.rgb(204, 153, 153);
}
} else if (type == MapRenderingTypes.AMENITY_EDUCATION) {
if(subtype == 2 || subtype == 3 || subtype == 5){
color = Color.rgb(240, 240, 216);
@ -275,7 +281,7 @@ public class OsmandRenderer implements Comparator<MapRenderObject> {
}
private void drawHighway(MapRenderObject obj, Canvas canvas, double leftTileX, double topTileY, int zoom, float rotate) {
private void drawPolyline(MapRenderObject obj, Canvas canvas, double leftTileX, double topTileY, int zoom, float rotate) {
if(obj.getPointsLength() == 0){
return;
}
@ -287,51 +293,101 @@ public class OsmandRenderer implements Comparator<MapRenderObject> {
Paint paint = paintStroke;
int hwType = MapRenderingTypes.getHighwayType(obj.getType());
boolean carRoad = true;
if (hwType == MapRenderingTypes.PL_HW_TRUNK) {
paint.setColor(clTrunkRoad);
} else if (hwType == MapRenderingTypes.PL_HW_MOTORWAY) {
paint.setColor(clMotorwayRoad);
} else if (hwType == MapRenderingTypes.PL_HW_PRIMARY) {
paint.setColor(clPrimaryRoad);
} else if (hwType == MapRenderingTypes.PL_HW_SECONDARY) {
paint.setColor(clSecondaryRoad);
} else if (hwType == MapRenderingTypes.PL_HW_TERTIARY) {
paint.setColor(clTertiaryRoad);
} else if (hwType == MapRenderingTypes.PL_HW_SERVICE || hwType == MapRenderingTypes.PL_HW_UNCLASSIFIED
|| hwType == MapRenderingTypes.PL_HW_RESIDENTIAL) {
paint.setColor(clRoadColor);
} else {
carRoad = false;
paint.setStrokeWidth(2);
paint.setPathEffect(pedestrianPathEffect);
if(hwType == MapRenderingTypes.PL_HW_TRACK || hwType == MapRenderingTypes.PL_HW_PATH){
paint.setColor(clTrackRoad);
paint.setPathEffect(trackPathEffect);
} else if(hwType == MapRenderingTypes.PL_HW_CYCLEWAY || hwType == MapRenderingTypes.PL_HW_BRIDLEWAY){
paint.setColor(clCycleWayRoad);
int type = MapRenderingTypes.getObjectType(obj.getType());
int subtype = MapRenderingTypes.getPolylineSubType(obj.getType());
boolean showText = true;
boolean showLine = true;
paint.setPathEffect(null);
paint.setShadowLayer(0, 0, 0, 0);
if (type == MapRenderingTypes.HIGHWAY) {
int hwType = subtype;
boolean carRoad = true;
if (hwType == MapRenderingTypes.PL_HW_TRUNK) {
paint.setColor(clTrunkRoad);
} else if (hwType == MapRenderingTypes.PL_HW_MOTORWAY) {
paint.setColor(clMotorwayRoad);
} else if (hwType == MapRenderingTypes.PL_HW_PRIMARY) {
paint.setColor(clPrimaryRoad);
} else if (hwType == MapRenderingTypes.PL_HW_SECONDARY) {
paint.setColor(clSecondaryRoad);
} else if (hwType == MapRenderingTypes.PL_HW_TERTIARY) {
paint.setColor(clTertiaryRoad);
paint.setShadowLayer(2, 0, 0, Color.rgb(186, 186, 186));
} else if (hwType == MapRenderingTypes.PL_HW_SERVICE || hwType == MapRenderingTypes.PL_HW_UNCLASSIFIED
|| hwType == MapRenderingTypes.PL_HW_RESIDENTIAL) {
paint.setShadowLayer(1, 0, 0, Color.rgb(194, 194, 194));
paint.setColor(clRoadColor);
} else if (hwType == MapRenderingTypes.PL_HW_PEDESTRIAN) {
paint.setShadowLayer(1, 0, 0, Color.rgb(176, 176, 176));
paint.setColor(Color.rgb(236, 236, 236));
} else {
paint.setColor(clPedestrianRoad);
carRoad = false;
paint.setStrokeWidth(2);
paint.setPathEffect(pedestrianPathEffect);
if (hwType == MapRenderingTypes.PL_HW_TRACK || hwType == MapRenderingTypes.PL_HW_PATH) {
paint.setColor(clTrackRoad);
paint.setPathEffect(trackPathEffect);
} else if (hwType == MapRenderingTypes.PL_HW_CYCLEWAY || hwType == MapRenderingTypes.PL_HW_BRIDLEWAY) {
paint.setColor(clCycleWayRoad);
} else {
paint.setColor(clPedestrianRoad);
}
}
if (carRoad) {
if (zoom < 16) {
paint.setStrokeWidth(6);
} else if (zoom == 16) {
paint.setStrokeWidth(7);
} else if (zoom == 17) {
paint.setStrokeWidth(11);
} else if (zoom >= 18) {
paint.setStrokeWidth(16);
}
if (hwType == MapRenderingTypes.PL_HW_SERVICE) {
paint.setStrokeWidth(paint.getStrokeWidth() - 2);
}
}
showText = carRoad || zoom > 16;
} else if(type == MapRenderingTypes.BARRIER){
showLine = zoom > 16;
// if(subtype == 2){
paint.setColor(Color.rgb(137, 136, 132));
// }
paint.setStrokeWidth(1);
} else if(type == MapRenderingTypes.RAILWAY){
paint.setStrokeWidth(2);
if(subtype == 6){
paint.setColor(Color.rgb(153, 153, 153));
if(zoom > 16){
paint.setStrokeWidth(3);
}
paint.setPathEffect(subwayPathEffect);
} else if(subtype == 2){
paint.setColor(Color.rgb(62, 62, 62));
} else if(subtype == 1){
paint.setColor(Color.rgb(153, 153, 153));
if(zoom >= 16){
paint.setStrokeWidth(3);
}
paint.setPathEffect(railwayPathEffect);
} else {
paint.setColor(Color.rgb(153, 153, 153));
}
} else if(type == MapRenderingTypes.WATERWAY){
if(subtype >= 1 && subtype <= 6){
paint.setColor(Color.rgb(181, 208, 208));
}
} else {
paint.setColor(Color.BLACK);
paint.setStrokeWidth(1);
}
if (carRoad) {
paint.setPathEffect(null);
if (zoom < 16) {
paint.setStrokeWidth(6);
} else if (zoom == 16) {
paint.setStrokeWidth(7);
} else if (zoom == 17) {
paint.setStrokeWidth(11);
} else if (zoom >= 18) {
paint.setStrokeWidth(16);
}
if(hwType == MapRenderingTypes.PL_HW_SERVICE){
paint.setStrokeWidth(paint.getStrokeWidth() - 2);
}
if(!showLine){
return;
}
boolean inverse = false;
@ -369,7 +425,7 @@ public class OsmandRenderer implements Comparator<MapRenderObject> {
}
if (path != null) {
canvas.drawPath(path, paint);
if (obj.getName() != null && carRoad) {
if (obj.getName() != null && showText) {
if (paintText.measureText(obj.getName()) < Math.max(Math.abs(xLength), Math.abs(yLength))) {
if (inverse) {
@ -439,6 +495,37 @@ public class OsmandRenderer implements Comparator<MapRenderObject> {
break;
}
}
} else if(type == MapRenderingTypes.TOURISM){
if (zoom > 15) {
switch (subType) {
case 4:
resId = R.drawable.h_camp_site;
break;
case 5:
resId = R.drawable.h_caravan_park;
break;
case 6:
resId = R.drawable.h_camp_site; // picnic
break;
case 9:
resId = R.drawable.h_alpinehut;
break;
case 10:
case 11:
resId = R.drawable.h_guest_house;
break;
case 12:
case 14:
resId = R.drawable.h_hostel;
break;
case 13:
resId = R.drawable.h_hotel;
break;
case 15:
resId = R.drawable.h_museum;
break;
}
}
} else if(type == MapRenderingTypes.AMENITY_SUSTENANCE){
@ -499,6 +586,14 @@ public class OsmandRenderer implements Comparator<MapRenderObject> {
} else if (subType == 2) {
resId = R.drawable.h_hospital;
}
} else if (type == MapRenderingTypes.AMENITY_ENTERTAINMENT) {
if (zoom >= 15) {
if (subType == 3) {
resId = R.drawable.h_cinema;
} else if(subType == 9) {
resId = R.drawable.h_theatre;
}
}
} else if(type == MapRenderingTypes.AMENITY_OTHER){
if (zoom > 16) {
switch (subType) {