Ticket #20102: 2021-11-28_area_highway_style.patch

File 2021-11-28_area_highway_style.patch, 8.4 KB (added by Woazboat, 4 years ago)

Updated area:highway style with special handling for junctions https://github.com/JOSM/josm/pull/82

  • resources/styles/standard/elemstyles.mapcss

    From d9581a3f12534d6f335e828d9ce09ac46537f7bf Mon Sep 17 00:00:00 2001
    From: Florian Kargl <f.kargl@posteo.de>
    Date: Sun, 28 Nov 2021 23:14:16 +0100
    Subject: [PATCH] Add style for area:highway
    
    + special style for area:highway + junction
    ---
     resources/styles/standard/elemstyles.mapcss | 264 +++++++++++++++++++-
     1 file changed, 257 insertions(+), 7 deletions(-)
    
    diff --git a/resources/styles/standard/elemstyles.mapcss b/resources/styles/standard/elemstyles.mapcss
    index e579729c70..908117cf1d 100644
    a b setting::note_annotation {  
    7171  default: false;
    7272}
    7373
     74setting::area_highway_opacity {
     75    type: double;
     76    label: tr("area:highway opacity");
     77    default: 0.1;
     78}
     79
    7480/*********************/
    7581/* turn restrictions */
    7682/*********************/
    node[barrier=hampshire_gate][!is_prop_set(icon-image)] {  
    530536    set icon_z17;
    531537}
    532538
     539/*********************/
     540/* area:highway tags */
     541/*********************/
     542
     543area["area:highway"="motorway"]:closed {
     544    fill-color: motorway#809bc0;
     545    fill-opacity: setting("area_highway_opacity");
     546    width: 1;
     547    dashes: 9,3;
     548}
     549area["area:highway"="motorway_link"]:closed {
     550    fill-color: motorway#809bc0;
     551    fill-opacity: setting("area_highway_opacity");
     552    width: 1;
     553    dashes: 9,3;
     554}
     555area["area:highway"="trunk"]:closed {
     556    fill-color: trunk#7fc97f;
     557    fill-opacity: setting("area_highway_opacity");
     558    width: 1;
     559    dashes: 9,3;
     560}
     561area["area:highway"="trunk_link"]:closed {
     562    fill-color: trunk#7fc97f;
     563    fill-opacity: setting("area_highway_opacity");
     564    width: 1;
     565    dashes: 9,3;
     566}
     567area["area:highway"="primary"]:closed {
     568    fill-color: primary#fb805f;
     569    fill-opacity: setting("area_highway_opacity");
     570    width: 1;
     571    dashes: 9,3;
     572}
     573area["area:highway"="primary_link"]:closed {
     574    fill-color: primary#fb805f;
     575    fill-opacity: setting("area_highway_opacity");
     576    width: 1;
     577    dashes: 9,3;
     578}
     579area["area:highway"="secondary"]:closed {
     580    fill-color: secondary#fdbf6f;
     581    fill-opacity: setting("area_highway_opacity");
     582    width: 1;
     583    dashes: 9,3;
     584}
     585area["area:highway"="secondary_link"]:closed {
     586    fill-color: secondary#fdbf6f;
     587    fill-opacity: setting("area_highway_opacity");
     588    width: 1;
     589    dashes: 9,3;
     590}
     591area["area:highway"="tertiary"]:closed {
     592    fill-color: tertiary#f7f496;
     593    fill-opacity: setting("area_highway_opacity");
     594    width: 1;
     595    dashes: 9,3;
     596}
     597area["area:highway"="tertiary_link"]:closed {
     598    fill-color: tertiary#f7f496;
     599    fill-opacity: setting("area_highway_opacity");
     600    width: 1;
     601    dashes: 9,3;
     602}
     603area["area:highway"="unclassified"]:closed {
     604    fill-color: street#c0c0c0;
     605    fill-opacity: setting("area_highway_opacity");
     606    width: 1;
     607    dashes: 9,3;
     608}
     609area["area:highway"="residential"]:closed {
     610    fill-color: street#c0c0c0;
     611    fill-opacity: setting("area_highway_opacity");
     612    width: 1;
     613    dashes: 9,3;
     614}
     615area["area:highway"="road"]:closed {
     616    fill-color: highway_road#770000;
     617    fill-opacity: setting("area_highway_opacity");
     618    width: 1;
     619    dashes: 9,3;
     620}
     621area["area:highway"="living_street"]:closed {
     622    fill-color: street#c0c0c0;
     623    fill-opacity: setting("area_highway_opacity");
     624    width: 1;
     625    dashes: 9,3;
     626    dashes-background-color: livingdashed#00ff00;
     627}
     628area["area:highway"="pedestrian"]:closed {
     629    fill-color: foot#00ff00;
     630    fill-opacity: setting("area_highway_opacity");
     631    width: 1;
     632    dashes: 9,3;
     633}
     634area["area:highway"="raceway"]:closed {
     635    fill-color: raceway#ff80ff;
     636    fill-opacity: setting("area_highway_opacity");
     637    width: 1;
     638    dashes: 9,3;
     639}
     640area["area:highway"="service"]:closed {
     641    fill-color: service#809bc0;
     642    fill-opacity: setting("area_highway_opacity");
     643    width: 1;
     644    dashes: 9,3;
     645}
     646area["area:highway"="cycleway"]:closed {
     647    fill-color: bicycle#b100ff;
     648    fill-opacity: setting("area_highway_opacity");
     649    width: 1;
     650    dashes: 9,3;
     651}
     652area["area:highway"="footway"]:closed {
     653    fill-color: foot#00ff00;
     654    fill-opacity: setting("area_highway_opacity");
     655    width: 1;
     656    dashes: 9,3;
     657}
     658area["area:highway"="track"]:closed {
     659    fill-color: highway_track#6e541c;
     660    fill-opacity: setting("area_highway_opacity");
     661    width: 1;
     662    dashes: 9,3;
     663}
     664area["area:highway"="bridleway"]:closed {
     665    fill-color: horse#a18559;
     666    fill-opacity: setting("area_highway_opacity");
     667    width: 1;
     668    dashes: 9,3;
     669}
     670area["area:highway"="path"]:closed {
     671    fill-color: foot#00ff00;
     672    fill-opacity: setting("area_highway_opacity");
     673    width: 1;
     674    dashes: 9,3;
     675}
     676area["area:highway"="construction"]:closed {
     677    fill-color: construction#ffff00;
     678    fill-opacity: setting("area_highway_opacity");
     679    width: 1;
     680    dashes: 9,3;
     681}
     682area["area:highway"="steps"]:closed {
     683    fill-color: foot#00ff00;
     684    fill-opacity: setting("area_highway_opacity");
     685    width: 1;
     686    dashes: 9,3;
     687}
     688area["area:highway"="bus_guideway"]:closed {
     689    fill-color: rail#404040;
     690    fill-opacity: setting("area_highway_opacity");
     691    width: 1;
     692    dashes: 9,3;
     693}
     694area["area:highway"="escape"]:closed {
     695    fill-color: street#c0c0c0;
     696    fill-opacity: setting("area_highway_opacity");
     697    width: 1;
     698    dashes: 9,3;
     699}
     700area["area:highway"="traffic_island"]:closed {
     701    fill-color: street#c0c0c0;
     702    fill-opacity: setting("area_highway_opacity");
     703    width: 1;
     704    dashes: 9,3;
     705}
     706area["area:highway"="platform"]:closed {
     707    fill-color: highway_platform#c0c0c0;
     708    fill-opacity: setting("area_highway_opacity");
     709    width: 1;
     710    dashes: 9,3;
     711}
     712area["area:highway"="bus_stop"]:closed {
     713    fill-color: bus#89cbeb;
     714    fill-opacity: setting("area_highway_opacity");
     715    width: 1;
     716    dashes: 9,3;
     717}
     718area["area:highway"="busway"]:closed {
     719    fill-color: bus#89cbeb;
     720    fill-opacity: setting("area_highway_opacity");
     721    width: 1;
     722    dashes: 9,3;
     723}
     724area["area:highway"="shoulder"]:closed {
     725    fill-color: street#c0c0c0;
     726    fill-opacity: setting("area_highway_opacity");
     727    width: 1;
     728    dashes: 9,3;
     729}
     730area["area:highway"="emergency_bay"]:closed {
     731    fill-color: street#c0c0c0;
     732    fill-opacity: setting("area_highway_opacity");
     733    width: 1;
     734    dashes: 9,3;
     735}
     736area["area:highway"="passing_place"]:closed {
     737    fill-color: street#c0c0c0;
     738    fill-opacity: setting("area_highway_opacity");
     739    width: 1;
     740    dashes: 9,3;
     741}
     742area["area:highway"="turning_circle"]:closed {
     743    fill-color: street#c0c0c0;
     744    fill-opacity: setting("area_highway_opacity");
     745    width: 1;
     746    dashes: 9,3;
     747}
     748area["area:highway"="turning_loop"]:closed {
     749    fill-color: street#c0c0c0;
     750    fill-opacity: setting("area_highway_opacity");
     751    width: 1;
     752    dashes: 9,3;
     753}
     754
     755
    533756/****************/
    534757/* highway tags */
    535758/****************/
    way[highway=raceway] {  
    726949way[highway=raceway][area?], relation[type=multipolygon][highway=raceway] {
    727950    fill-color: raceway#ff80ff;
    728951}
    729 area[junction=yes] {
    730     fill-color: junction#c0c0c0;
    731 }
    732 node[junction=yes] {
    733     icon-image: "presets/vehicle/junction.svg";
    734     set icon_z17;
    735 }
     952
    736953node[highway=traffic_mirror] {
    737954    icon-image: "presets/vehicle/traffic_mirror.svg";
    738955    set icon_z17;
    node[traffic_calming=mini_bumps] {  
    9751192/* junction tag */
    9761193/****************/
    9771194
     1195area["junction"][!"junction"?!] {
     1196    set junctionArea;
     1197}
     1198
     1199node[junction=yes] {
     1200    icon-image: "presets/vehicle/junction.svg";
     1201    set icon_z17;
     1202}
     1203
    9781204node[junction=roundabout] {
    9791205    icon-image: "presets/vehicle/restriction/roundabout_left.svg";
    9801206    set icon_z17;
    node:righthandtraffic[junction=roundabout] {  
    9841210    set icon_z17;
    9851211}
    9861212
     1213area.junctionArea[!"area:highway"] {
     1214    fill-color: junction#c0c0c0;
     1215}
     1216
     1217/********************************/
     1218/* area:highway + junction tags */
     1219/********************************/
     1220
     1221area.junctionArea["area:highway"]:closed {
     1222    dashes-background-color: junction#c0c0c0;
     1223}
     1224area.junctionArea["area:highway"]:clockwise:closed {
     1225    right-casing-width: 10;
     1226    right-casing-color: junction#c0c0c0;
     1227    right-casing-linejoin: miter;
     1228    right-casing-opacity: setting("area_highway_opacity") + 0.1;
     1229}
     1230area.junctionArea["area:highway"]:anticlockwise:closed {
     1231    left-casing-width: 10;
     1232    left-casing-color: junction#c0c0c0;
     1233    left-casing-linejoin: miter;
     1234    left-casing-opacity: setting("area_highway_opacity") + 0.1;
     1235}
     1236
    9871237/*****************/
    9881238/* cycleway tags */
    9891239/*****************/