Changes between Version 12 and Version 13 of Styles/ParkingLanes


Ignore:
Timestamp:
2021-01-10T14:40:36+01:00 (10 days ago)
Author:
JeroenHoek
Comment:

Update for parking:lane type separate, add settings for warnings and condition highlighting.

Legend:

Unmodified
Added
Removed
Modified
  • Styles/ParkingLanes

    v12 v13  
    1616    description: "Parking lanes along roads and parking/stopping restrictions.";
    1717    link: "https://wiki.openstreetmap.org/wiki/Key:parking:lane";
    18     author: "Sebastian Klemm, Kay Drangmeister";
     18    author: "Sebastian Klemm, Kay Drangmeister, Jeroen Hoek";
    1919    version: "0.[[revision]]_[[date]]";
    2020    min-josm-version: "4399";
     
    3434}
    3535
     36/* Settings. */
     37
     38setting::show_warnings {
     39  type: boolean;
     40  label: tr("Show warning symbols for incompatible tag values");
     41  default: true;
     42}
     43
     44setting::highlight_conditions {
     45  type: boolean;
     46  label: tr("Use different colours to highlight values of parking:condition:*");
     47  default: true;
     48}
     49
     50/* Mark the parking:lane types that can have parking:conditional tags. */
     51way[highway][parking:lane:right=~/^(parallel|perpendicular|diagonal|marked)$/]::parking_lanes_right,
     52way[highway][parking:lane:both=~/^(parallel|perpendicular|diagonal|marked)$/]::parking_lanes_right
     53{
     54    set conditional_type;
     55}
     56
     57way[highway][parking:lane:left=~/^(parallel|perpendicular|diagonal|marked)$/]::parking_lanes_left,
     58way[highway][parking:lane:both=~/^(parallel|perpendicular|diagonal|marked)$/]::parking_lanes_left
     59{
     60    set conditional_type;
     61}
     62
    3663way[highway][parking:lane:right]::parking_lanes_right,
    3764way[highway][parking:lane:both]::parking_lanes_right
     
    144171}
    145172
     173way[highway][parking:lane:right=separate]::parking_lanes_right,
     174way[highway][parking:lane:both=separate]::parking_lanes_right
     175{
     176    repeat-image: images/separate-flipped.svg;
     177}
     178way[highway][parking:lane:left=separate]::parking_lanes_left,
     179way[highway][parking:lane:both=separate]::parking_lanes_left
     180{
     181    repeat-image: images/separate.svg;
     182}
     183
    146184way[highway][parking:lane:right]::parking_lanes_right,
    147185way[highway][parking:lane:both]::parking_lanes_right
    148186{
    149187    offset: eval(0 - 4 - (prop("width") * 0.5) - (prop("width", "default") * 0.5));
    150     a: print(prop("offset"));
     188    repeat-image-offset: -8;
     189    repeat-image-width: 8;
     190    repeat-image-height: 8;
     191    repeat-image-spacing: 16;
    151192}
    152193
     
    155196{
    156197    offset: eval(4 + (prop("width") * 0.5) + (prop("width", "default") * 0.5));
    157 }
    158 
    159 way[highway][parking:condition:right=free]::parking_lanes_right,
    160 way[highway][parking:condition:both=free]::parking_lanes_right
     198    repeat-image-width: 8;
     199    repeat-image-height: 8;
     200    repeat-image-offset: 8;
     201    repeat-image-spacing: 16;
     202}
     203
     204/* Parking conditions tagged on the way itself only make sense for certain parking:lane types. */
     205way[highway][parking:condition:right]!.conditional_type::parking_lanes_right,
     206way[highway][parking:condition:both]!.conditional_type::parking_lanes_right
     207{
     208    set warning;
     209}
     210
     211way[highway][parking:condition:left]!.conditional_type::parking_lanes_left,
     212way[highway][parking:condition:both]!.conditional_type::parking_lanes_left
     213{
     214    set warning;
     215}
     216
     217/* Tags should either document 'both' sides or 'left' and 'right' separately. */
     218way[highway][parking:condition:both][parking:condition:right]::parking_lanes_right,
     219way[highway][parking:lane:both][parking:lane:right]::parking_lanes_right
     220{
     221    set warning;
     222}
     223
     224way[highway][parking:condition:both][parking:condition:left]::parking_lanes_left,
     225way[highway][parking:lane:both][parking:lane:left]::parking_lanes_left
     226{
     227    set warning;
     228}
     229
     230way[highway][parking:condition:right=free][setting("highlight_conditions")].conditional_type::parking_lanes_right,
     231way[highway][parking:condition:both=free][setting("highlight_conditions")].conditional_type::parking_lanes_right
    161232{
    162233    color: #7fff00;
    163234}
    164 way[highway][parking:condition:left=free]::parking_lanes_left,
    165 way[highway][parking:condition:both=free]::parking_lanes_left
     235
     236way[highway][parking:condition:left=free][setting("highlight_conditions")].conditional_type::parking_lanes_left,
     237way[highway][parking:condition:both=free][setting("highlight_conditions")].conditional_type::parking_lanes_left
    166238{
    167239    color: #7fff00;
    168240}
    169241
    170 way[highway][parking:condition:right=disc]::parking_lanes_right,
    171 way[highway][parking:condition:both=disc]::parking_lanes_right
     242way[highway][parking:condition:right=disc][setting("highlight_conditions")].conditional_type::parking_lanes_right,
     243way[highway][parking:condition:both=disc][setting("highlight_conditions")].conditional_type::parking_lanes_right
    172244{
    173245    color: #1c86ee;
    174246}
    175 way[highway][parking:condition:left=disc]::parking_lanes_left,
    176 way[highway][parking:condition:both=disc]::parking_lanes_left
     247way[highway][parking:condition:left=disc][setting("highlight_conditions")].conditional_type::parking_lanes_left,
     248way[highway][parking:condition:both=disc][setting("highlight_conditions")].conditional_type::parking_lanes_left
    177249{
    178250    color: #1c86ee;
    179251}
    180252
    181 way[highway][parking:condition:right=ticket]::parking_lanes_right,
    182 way[highway][parking:condition:both=ticket]::parking_lanes_right
     253way[highway][parking:condition:right=ticket][setting("highlight_conditions")].conditional_type::parking_lanes_right,
     254way[highway][parking:condition:both=ticket][setting("highlight_conditions")].conditional_type::parking_lanes_right
    183255{
    184256    color: #009999;
    185257}
    186 way[highway][parking:condition:left=ticket]::parking_lanes_left,
    187 way[highway][parking:condition:both=ticket]::parking_lanes_left
     258way[highway][parking:condition:left=ticket][setting("highlight_conditions")].conditional_type::parking_lanes_left,
     259way[highway][parking:condition:both=ticket][setting("highlight_conditions")].conditional_type::parking_lanes_left
    188260{
    189261    color: #009999;
    190262}
    191263
    192 way[highway][parking:condition:right=residents]::parking_lanes_right,
    193 way[highway][parking:condition:both=residents]::parking_lanes_right
     264way[highway][parking:condition:right=residents][setting("highlight_conditions")].conditional_type::parking_lanes_right,
     265way[highway][parking:condition:both=residents][setting("highlight_conditions")].conditional_type::parking_lanes_right
    194266{
    195267    color: #a33600;
    196268}
    197 way[highway][parking:condition:left=residents]::parking_lanes_left,
    198 way[highway][parking:condition:both=residents]::parking_lanes_left
     269way[highway][parking:condition:left=residents][setting("highlight_conditions")].conditional_type::parking_lanes_left,
     270way[highway][parking:condition:both=residents][setting("highlight_conditions")].conditional_type::parking_lanes_left
    199271{
    200272    color: #a33600;
    201273}
    202274
    203 way[highway][parking:condition:right=customers]::parking_lanes_right,
    204 way[highway][parking:condition:both=customers]::parking_lanes_right
     275way[highway][parking:condition:right=customers][setting("highlight_conditions")].conditional_type::parking_lanes_right,
     276way[highway][parking:condition:both=customers][setting("highlight_conditions")].conditional_type::parking_lanes_right
    205277{
    206278    color: #ff3399;
    207279}
    208 way[highway][parking:condition:left=customers]::parking_lanes_left,
    209 way[highway][parking:condition:both=customers]::parking_lanes_left
     280way[highway][parking:condition:left=customers][setting("highlight_conditions")].conditional_type::parking_lanes_left,
     281way[highway][parking:condition:both=customers][setting("highlight_conditions")].conditional_type::parking_lanes_left
    210282{
    211283    color: #ff3399;
    212284}
    213285
    214 way[highway][parking:condition:right=private]::parking_lanes_right,
    215 way[highway][parking:condition:both=private]::parking_lanes_right
     286way[highway][parking:condition:right=private][setting("highlight_conditions")].conditional_type::parking_lanes_right,
     287way[highway][parking:condition:both=private][setting("highlight_conditions")].conditional_type::parking_lanes_right
    216288{
    217289    color: #ff0000;
    218290}
    219 way[highway][parking:condition:left=private]::parking_lanes_left,
    220 way[highway][parking:condition:both=private]::parking_lanes_left
     291way[highway][parking:condition:left=private][setting("highlight_conditions")].conditional_type::parking_lanes_left,
     292way[highway][parking:condition:both=private][setting("highlight_conditions")].conditional_type::parking_lanes_left
    221293{
    222294    color: #ff0000;
    223295}
    224296
    225 way[highway][parking:condition:right=disabled]::parking_lanes_right,
    226 way[highway][parking:condition:both=disabled]::parking_lanes_right
     297way[highway][parking:condition:right=disabled][setting("highlight_conditions")].conditional_type::parking_lanes_right,
     298way[highway][parking:condition:both=disabled][setting("highlight_conditions")].conditional_type::parking_lanes_right
    227299{
    228300    color: #ffd800;
    229301}
    230 way[highway][parking:condition:left=disabled]::parking_lanes_left,
    231 way[highway][parking:condition:both=disabled]::parking_lanes_left
     302way[highway][parking:condition:left=disabled][setting("highlight_conditions")].conditional_type::parking_lanes_left,
     303way[highway][parking:condition:both=disabled][setting("highlight_conditions")].conditional_type::parking_lanes_left
    232304{
    233305    color: #ffd800;
    234306}
    235307
     308way.warning[setting("show_warnings")]::parking_lanes_right
     309{
     310    width: 0;
     311    repeat-image: images/warning-flipped.svg;
     312    repeat-image-offset: -12;
     313    repeat-image-width: 16;
     314    repeat-image-height: 16;
     315    repeat-image-spacing: 12;
     316}
     317
     318way.warning[setting("show_warnings")]::parking_lanes_left
     319{
     320    width: 0;
     321    repeat-image: images/warning.svg;
     322    repeat-image-offset: 12;
     323    repeat-image-width: 16;
     324    repeat-image-height: 16;
     325    repeat-image-spacing: 12;
     326}
     327
    236328}}}