Changes between Version 47 and Version 48 of Styles/Lane_and_Road_Attributes


Ignore:
Timestamp:
2014-10-01T16:14:40+02:00 (11 years ago)
Author:
imagic
Comment:

Added support for cycleway and footway, added an icon for the style (thanks to Klumbumbus) and did some minor code cleanup

Legend:

Unmodified
Added
Removed
Modified
  • Styles/Lane_and_Road_Attributes

    v47 v48  
    6363#!style type="mapcss"
    6464
    65 
    6665meta {
    6766    title: "Lane and road attributes";
     
    6968    link: "http://josm.openstreetmap.de/wiki/Styles/Lane_and_Road_Attributes";
    7069    author: "Martin Vonwald";
    71     version: "2.6-[[revision]]_[[date]]";
     70    version: "2.7-[[revision]]_[[date]]";
    7271    license: "CC-BY-SA";
     72    icon: "images/icon.png";
    7373    min-josm-version: "7287";
    7474}
     
    15881588{
    15891589    lane_min_width: 4;
    1590     lane_default_width: eval(max(prop(lane_min_width),(has_tag_key(width)?((1.25*tag(width))/prop(lanes_all)):4)));
     1590    lane_default_width: eval(max(prop(lane_min_width),(has_tag_key(width)?((prop(pixel_per_metre,"default")*tag(width))/prop(lanes_all)):(3*prop(pixel_per_metre,"default")))));
    15911591    change_allowed: list(6,9);
    15921592    road_marking_width: 1;
     
    15971597{
    15981598    lane_min_width: 8;
    1599     lane_default_width: eval(max(prop(lane_min_width),(has_tag_key(width)?((2.5*tag(width))/prop(lanes_all)):8)));
     1599    lane_default_width: eval(max(prop(lane_min_width),(has_tag_key(width)?((prop(pixel_per_metre,"default")*tag(width))/prop(lanes_all)):(3*prop(pixel_per_metre,"default")))));
    16001600    change_allowed: list(12,18);
    16011601    road_marking_width: 2;
     
    16061606{
    16071607    lane_min_width: 8;
    1608     lane_default_width: eval(max(prop(lane_min_width),(has_tag_key(width)?((5*tag(width))/prop(lanes_all)):16)));
     1608    lane_default_width: eval(max(prop(lane_min_width),(has_tag_key(width)?((prop(pixel_per_metre,"default")*tag(width))/prop(lanes_all)):(3*prop(pixel_per_metre,"default")))));
    16091609    change_allowed: list(24,36);
    16101610    road_marking_width: 2;
     
    16151615{
    16161616    lane_min_width: 8;
    1617     lane_default_width: eval(max(prop(lane_min_width),(has_tag_key(width)?((10*tag(width))/prop(lanes_all)):32)));
     1617    lane_default_width: eval(max(prop(lane_min_width),(has_tag_key(width)?((prop(pixel_per_metre,"default")*tag(width))/prop(lanes_all)):(3*prop(pixel_per_metre,"default")))));
    16181618    change_allowed: list(48,72);
    16191619    road_marking_width: 2;
     
    16241624{
    16251625    lane_min_width: 12;
    1626     lane_default_width: eval(max(prop(lane_min_width),(has_tag_key(width)?((20*tag(width))/prop(lanes_all)):64)));
     1626    lane_default_width: eval(max(prop(lane_min_width),(has_tag_key(width)?((prop(pixel_per_metre,"default")*tag(width))/prop(lanes_all)):(3*prop(pixel_per_metre,"default")))));
    16271627    change_allowed: list(96,144);
    16281628    road_marking_width: 4;
     
    16331633{
    16341634    lane_min_width: 20;
    1635     lane_default_width: eval(max(prop(lane_min_width),(has_tag_key(width)?((40*tag(width))/prop(lanes_all)):128)));
     1635    lane_default_width: eval(max(prop(lane_min_width),(has_tag_key(width)?((prop(pixel_per_metre,"default")*tag(width))/prop(lanes_all)):(3*prop(pixel_per_metre,"default")))));
    16361636    change_allowed: list(192,288);
    16371637    road_marking_width: 6;
     
    31203120/***************************************************************************************************************************************************/
    31213121/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
     3122/* Extra rendering for footways/cycleways if not already rendered                                                                                  */
     3123/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
     3124/***************************************************************************************************************************************************/
     3125way|z17-[!is_prop_set(ok, "default")][highway=footway],
     3126way|z17-[!is_prop_set(ok, "default")][highway=cycleway]
     3127{
     3128    width: eval(2*prop(pixel_per_metre,"default"));
     3129    linecap: none;
     3130    opacity: eval(prop("style_lane_opacity","default"));
     3131    right-casing-width: eval(max(1,0.15*prop(pixel_per_metre,"default")));   right-casing-color: gray;
     3132    left-casing-width:  eval(max(1,0.15*prop(pixel_per_metre,"default")));   left-casing-color:  gray;   
     3133    casing-linecap: none;
     3134    temp: 0;
     3135    temp: eval(prop(temp)+(((tag("highway")="footway")  || ((has_tag_key("foot"))    && (tag("foot")   ="designated")))?1:0));
     3136    temp: eval(prop(temp)+(((tag("highway")="cycleway") || ((has_tag_key("bicycle")) && (tag("bicycle")="designated")))?2:0));
     3137    color: eval(get(prop(style_sidewalk_color,"default"),prop(temp)));
     3138}
     3139
     3140/***************************************************************************************************************************************************/
     3141/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
    31223142/* Additional attributes/features                                                                                                                  */
    31233143/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
     
    31703190    symbol-fill-opacity: 0.05;
    31713191}
    3172 
    31733192
    31743193/*-------------------------------------------------------------------------------------------------------------------------------------------------*/