Skip to content

Commit 2ec63b0

Browse files
committed
Special style for area:highway + junction
1 parent fa2f37d commit 2ec63b0

File tree

1 file changed

+72
-44
lines changed

1 file changed

+72
-44
lines changed

resources/styles/standard/elemstyles.mapcss

Lines changed: 72 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -536,222 +536,223 @@ node[barrier=hampshire_gate][!is_prop_set(icon-image)] {
536536
set icon_z17;
537537
}
538538

539-
/****************/
539+
/*********************/
540540
/* area:highway tags */
541-
/****************/
541+
/*********************/
542542

543-
area["area:highway"=motorway]:closed {
543+
area["area:highway"="motorway"]:closed {
544544
fill-color: motorway#809bc0;
545545
fill-opacity: setting("area_highway_opacity");
546546
width: 1;
547547
dashes: 9,3;
548548
}
549-
area["area:highway"=motorway_link]:closed {
549+
area["area:highway"="motorway_link"]:closed {
550550
fill-color: motorway#809bc0;
551551
fill-opacity: setting("area_highway_opacity");
552552
width: 1;
553553
dashes: 9,3;
554554
}
555-
area["area:highway"=trunk]:closed {
555+
area["area:highway"="trunk"]:closed {
556556
fill-color: trunk#7fc97f;
557557
fill-opacity: setting("area_highway_opacity");
558558
width: 1;
559559
dashes: 9,3;
560560
}
561-
area["area:highway"=trunk_link]:closed {
561+
area["area:highway"="trunk_link"]:closed {
562562
fill-color: trunk#7fc97f;
563563
fill-opacity: setting("area_highway_opacity");
564564
width: 1;
565565
dashes: 9,3;
566566
}
567-
area["area:highway"=primary]:closed {
567+
area["area:highway"="primary"]:closed {
568568
fill-color: primary#fb805f;
569569
fill-opacity: setting("area_highway_opacity");
570570
width: 1;
571571
dashes: 9,3;
572572
}
573-
area["area:highway"=primary_link]:closed {
573+
area["area:highway"="primary_link"]:closed {
574574
fill-color: primary#fb805f;
575575
fill-opacity: setting("area_highway_opacity");
576576
width: 1;
577577
dashes: 9,3;
578578
}
579-
area["area:highway"=secondary]:closed {
579+
area["area:highway"="secondary"]:closed {
580580
fill-color: secondary#fdbf6f;
581581
fill-opacity: setting("area_highway_opacity");
582582
width: 1;
583583
dashes: 9,3;
584584
}
585-
area["area:highway"=secondary_link]:closed {
585+
area["area:highway"="secondary_link"]:closed {
586586
fill-color: secondary#fdbf6f;
587587
fill-opacity: setting("area_highway_opacity");
588588
width: 1;
589589
dashes: 9,3;
590590
}
591-
area["area:highway"=tertiary]:closed {
591+
area["area:highway"="tertiary"]:closed {
592592
fill-color: tertiary#f7f496;
593593
fill-opacity: setting("area_highway_opacity");
594594
width: 1;
595595
dashes: 9,3;
596596
}
597-
area["area:highway"=tertiary_link]:closed {
597+
area["area:highway"="tertiary_link"]:closed {
598598
fill-color: tertiary#f7f496;
599599
fill-opacity: setting("area_highway_opacity");
600600
width: 1;
601601
dashes: 9,3;
602602
}
603-
area["area:highway"=unclassified]:closed {
603+
area["area:highway"="unclassified"]:closed {
604604
fill-color: street#c0c0c0;
605605
fill-opacity: setting("area_highway_opacity");
606606
width: 1;
607607
dashes: 9,3;
608608
}
609-
area["area:highway"=residential]:closed {
609+
area["area:highway"="residential"]:closed {
610610
fill-color: street#c0c0c0;
611611
fill-opacity: setting("area_highway_opacity");
612612
width: 1;
613613
dashes: 9,3;
614614
}
615-
area["area:highway"=road]:closed {
615+
area["area:highway"="road"]:closed {
616616
fill-color: highway_road#770000;
617617
fill-opacity: setting("area_highway_opacity");
618618
width: 1;
619619
dashes: 9,3;
620620
}
621-
area["area:highway"=living_street]:closed {
621+
area["area:highway"="living_street"]:closed {
622622
fill-color: street#c0c0c0;
623623
fill-opacity: setting("area_highway_opacity");
624624
width: 1;
625625
dashes: 9,3;
626626
dashes-background-color: livingdashed#00ff00;
627627
}
628-
area["area:highway"=pedestrian]:closed {
628+
area["area:highway"="pedestrian"]:closed {
629629
fill-color: foot#00ff00;
630630
fill-opacity: setting("area_highway_opacity");
631631
width: 1;
632632
dashes: 9,3;
633633
}
634-
area["area:highway"=raceway]:closed {
634+
area["area:highway"="raceway"]:closed {
635635
fill-color: raceway#ff80ff;
636636
fill-opacity: setting("area_highway_opacity");
637637
width: 1;
638638
dashes: 9,3;
639639
}
640-
area["area:highway"=service]:closed {
640+
area["area:highway"="service"]:closed {
641641
fill-color: service#809bc0;
642642
fill-opacity: setting("area_highway_opacity");
643643
width: 1;
644644
dashes: 9,3;
645645
}
646-
area["area:highway"=cycleway]:closed {
646+
area["area:highway"="cycleway"]:closed {
647647
fill-color: bicycle#b100ff;
648648
fill-opacity: setting("area_highway_opacity");
649649
width: 1;
650650
dashes: 9,3;
651651
}
652-
area["area:highway"=footway]:closed {
652+
area["area:highway"="footway"]:closed {
653653
fill-color: foot#00ff00;
654654
fill-opacity: setting("area_highway_opacity");
655655
width: 1;
656656
dashes: 9,3;
657657
}
658-
area["area:highway"=track]:closed {
658+
area["area:highway"="track"]:closed {
659659
fill-color: highway_track#6e541c;
660660
fill-opacity: setting("area_highway_opacity");
661661
width: 1;
662662
dashes: 9,3;
663663
}
664-
area["area:highway"=bridleway]:closed {
664+
area["area:highway"="bridleway"]:closed {
665665
fill-color: horse#a18559;
666666
fill-opacity: setting("area_highway_opacity");
667667
width: 1;
668668
dashes: 9,3;
669669
}
670-
area["area:highway"=path]:closed {
670+
area["area:highway"="path"]:closed {
671671
fill-color: foot#00ff00;
672672
fill-opacity: setting("area_highway_opacity");
673673
width: 1;
674674
dashes: 9,3;
675675
}
676-
area["area:highway"=construction]:closed {
676+
area["area:highway"="construction"]:closed {
677677
fill-color: construction#ffff00;
678678
fill-opacity: setting("area_highway_opacity");
679679
width: 1;
680680
dashes: 9,3;
681681
}
682-
area["area:highway"=steps]:closed {
682+
area["area:highway"="steps"]:closed {
683683
fill-color: foot#00ff00;
684684
fill-opacity: setting("area_highway_opacity");
685685
width: 1;
686686
dashes: 9,3;
687687
}
688-
area["area:highway"=bus_guideway]:closed {
688+
area["area:highway"="bus_guideway"]:closed {
689689
fill-color: rail#404040;
690690
fill-opacity: setting("area_highway_opacity");
691691
width: 1;
692692
dashes: 9,3;
693693
}
694-
area["area:highway"=escape]:closed {
694+
area["area:highway"="escape"]:closed {
695695
fill-color: street#c0c0c0;
696696
fill-opacity: setting("area_highway_opacity");
697697
width: 1;
698698
dashes: 9,3;
699699
}
700-
area["area:highway"=traffic_island]:closed {
700+
area["area:highway"="traffic_island"]:closed {
701701
fill-color: street#c0c0c0;
702702
fill-opacity: setting("area_highway_opacity");
703703
width: 1;
704704
dashes: 9,3;
705705
}
706-
area["area:highway"=platform]:closed {
706+
area["area:highway"="platform"]:closed {
707707
fill-color: highway_platform#c0c0c0;
708708
fill-opacity: setting("area_highway_opacity");
709709
width: 1;
710710
dashes: 9,3;
711711
}
712-
area["area:highway"=bus_stop]:closed {
712+
area["area:highway"="bus_stop"]:closed {
713713
fill-color: bus#89cbeb;
714714
fill-opacity: setting("area_highway_opacity");
715715
width: 1;
716716
dashes: 9,3;
717717
}
718-
area["area:highway"=busway]:closed {
718+
area["area:highway"="busway"]:closed {
719719
fill-color: bus#89cbeb;
720720
fill-opacity: setting("area_highway_opacity");
721721
width: 1;
722722
dashes: 9,3;
723723
}
724-
area["area:highway"=shoulder]:closed {
724+
area["area:highway"="shoulder"]:closed {
725725
fill-color: street#c0c0c0;
726726
fill-opacity: setting("area_highway_opacity");
727727
width: 1;
728728
dashes: 9,3;
729729
}
730-
area["area:highway"=emergency_bay]:closed {
730+
area["area:highway"="emergency_bay"]:closed {
731731
fill-color: street#c0c0c0;
732732
fill-opacity: setting("area_highway_opacity");
733733
width: 1;
734734
dashes: 9,3;
735735
}
736-
area["area:highway"=passing_place]:closed {
736+
area["area:highway"="passing_place"]:closed {
737737
fill-color: street#c0c0c0;
738738
fill-opacity: setting("area_highway_opacity");
739739
width: 1;
740740
dashes: 9,3;
741741
}
742-
area["area:highway"=turning_circle]:closed {
742+
area["area:highway"="turning_circle"]:closed {
743743
fill-color: street#c0c0c0;
744744
fill-opacity: setting("area_highway_opacity");
745745
width: 1;
746746
dashes: 9,3;
747747
}
748-
area["area:highway"=turning_loop]:closed {
748+
area["area:highway"="turning_loop"]:closed {
749749
fill-color: street#c0c0c0;
750750
fill-opacity: setting("area_highway_opacity");
751751
width: 1;
752752
dashes: 9,3;
753753
}
754754

755+
755756
/****************/
756757
/* highway tags */
757758
/****************/
@@ -948,13 +949,7 @@ way[highway=raceway] {
948949
way[highway=raceway][area?], relation[type=multipolygon][highway=raceway] {
949950
fill-color: raceway#ff80ff;
950951
}
951-
area[junction=yes] {
952-
fill-color: junction#c0c0c0;
953-
}
954-
node[junction=yes] {
955-
icon-image: "presets/vehicle/junction.svg";
956-
set icon_z17;
957-
}
952+
958953
node[highway=traffic_mirror] {
959954
icon-image: "presets/vehicle/traffic_mirror.svg";
960955
set icon_z17;
@@ -1197,6 +1192,15 @@ node[traffic_calming=mini_bumps] {
11971192
/* junction tag */
11981193
/****************/
11991194

1195+
area["junction"][!"junction"?!] {
1196+
set junctionArea;
1197+
}
1198+
1199+
node[junction=yes] {
1200+
icon-image: "presets/vehicle/junction.svg";
1201+
set icon_z17;
1202+
}
1203+
12001204
node[junction=roundabout] {
12011205
icon-image: "presets/vehicle/restriction/roundabout_left.svg";
12021206
set icon_z17;
@@ -1206,6 +1210,30 @@ node:righthandtraffic[junction=roundabout] {
12061210
set icon_z17;
12071211
}
12081212

1213+
area.junctionArea[!"area:highway"] {
1214+
fill-color: junction#c0c0c0;
1215+
}
1216+
1217+
/********************************/
1218+
/* area:highway + junction tags */
1219+
/********************************/
1220+
1221+
area.junctionArea["area:highway"]:closed {
1222+
dashes-background-color: junction#c0c0c0;
1223+
}
1224+
area.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+
}
1230+
area.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+
12091237
/*****************/
12101238
/* cycleway tags */
12111239
/*****************/

0 commit comments

Comments
 (0)