Ticket #10301: maxspeednodes.diff

File maxspeednodes.diff, 2.1 KB (added by Klumbumbus, 5 years ago)
  • styles/standard/elemstyles.mapcss

     
    273273node[maxlength] {
    274274    icon-image: "vehicle/restriction/maxlength.png";
    275275}
    276 node[maxspeed] {
    277     icon-image: "vehicle/restriction/speed.png";
    278 }
    279276node[minspeed] {
    280277    icon-image: "vehicle/restriction/minspeed.png";
    281278}
    282279node[maxstay],
    283280node[toll] {
    284281    icon-image: "misc/no_icon.png";
     282}
     283
     284/******************/
     285/* maxspeed nodes */
     286/******************/
     287node[maxspeed=none] {
     288    icon-image: "vehicle/restriction/maxspeed_none.svg";
     289}
     290node[maxspeed=~/^[0-9]+$/] {
     291    maxspeedprop: tag(maxspeed);
     292    set maxspeedclass;
     293}
     294node[maxspeed=signals] {
     295    maxspeedprop: "▒";
     296    set maxspeedclass;
     297}
     298node[maxspeed=~/^[0-9]+ mph/] {
     299    maxspeedprop: get(split(" mph",tag(maxspeed)),0);
     300    set maxspeedclass;
     301}
     302node[maxspeed=~/[0-9]+ km\/h/] {
     303    maxspeedprop: get(split(" km/h",tag(maxspeed)),0);
     304    set maxspeedclass;
     305}
     306node[maxspeed=~/[0-9]+ knots/] {
     307    maxspeedprop: get(split(" knots",tag(maxspeed)),0);
     308    set maxspeedclass;
     309}
     310node[prop(maxspeedclass, default)]::core_maxnodebg {
     311    /* background (white) */
     312    symbol-shape: circle;
     313    symbol-size: 17;
     314    symbol-fill-color: white;
     315    major-z-index: 4.2;
     316}
     317node[maxspeed]["maxspeed:variable"]["maxspeed:variable"!="no"]::core_maxnodebg,
     318node[maxspeed=signals]::core_maxnodebg {
     319    /* background (black) */
     320    symbol-fill-color: black;
     321}
     322node[prop(maxspeedclass, default)]::core_maxnodefg {
     323    /* foreground (black text and red circle) */
     324    symbol-shape: circle;
     325    symbol-size: 15;
     326    symbol-stroke-color: crimson;
     327    symbol-stroke-width: 2;
     328    text: prop(maxspeedprop, default);
     329    font-size: 8;
     330    font-weight: bold;
     331    text-color: black;
     332    text-anchor-horizontal: center;
     333    text-anchor-vertical: center;
     334    text-offset-x: 0;
     335    text-offset-y: 0;
     336    major-z-index: 4.2;
     337}
     338node[maxspeed]["maxspeed:variable"]["maxspeed:variable"!="no"]::core_maxnodefg,
     339node[maxspeed=signals]::core_maxnodefg {
     340    /* foreground (white text) */
     341    text-color: white;
    285342}
    286343
    287344/**************/