Render relation route icon lines dynamically (close #5926)

This commit is contained in:
Quincy Morgan
2019-04-08 19:58:50 -07:00
parent b01f57f9c6
commit ae80c88f37
45 changed files with 192 additions and 462 deletions
+1 -1
View File
@@ -179,7 +179,7 @@ g.vertex.selected .shadow {
.preset-icon .icon.iD-other-line {
color: #989898;
}
.preset-icon-line path.casing {
.preset-icon-container path.line.casing {
stroke: #afafaf;
}
+11 -11
View File
@@ -1,4 +1,4 @@
/* highways */
preset-icon-container/* highways */
/* defaults */
.preset-icon .icon.tag-highway.other-line {
@@ -486,10 +486,10 @@ path.line.stroke.tag-highway-path {
}
path.line.stroke.tag-highway-footway,
path.line.stroke.tag-highway_bus_stop,
.preset-icon-line path.casing.tag-highway-footway {
.preset-icon-container path.casing.tag-highway-footway {
stroke: #988;
}
.preset-icon-line path.stroke.tag-highway-footway:not(.tag-footway-crossing):not(.tag-man_made-pier):not(.tag-public_transport-platform) {
.preset-icon-container path.stroke.tag-highway-footway:not(.tag-footway-crossing):not(.tag-man_made-pier):not(.tag-public_transport-platform) {
stroke: #fff;
}
@@ -500,10 +500,10 @@ path.line.stroke.tag-highway_bus_stop,
fill: #fff;
}
path.line.stroke.tag-highway-cycleway,
.preset-icon-line path.casing.tag-highway-cycleway {
.preset-icon-container path.casing.tag-highway-cycleway {
stroke: #58a9ed;
}
.preset-icon-line path.stroke.tag-highway-cycleway:not(.tag-crossing) {
.preset-icon-container path.stroke.tag-highway-cycleway:not(.tag-crossing) {
stroke: #fff;
}
@@ -514,10 +514,10 @@ path.line.stroke.tag-highway-cycleway,
fill: #fff;
}
path.line.stroke.tag-highway-bridleway,
.preset-icon-line path.casing.tag-highway-bridleway {
.preset-icon-container path.casing.tag-highway-bridleway {
stroke: #e06d5f;
}
.preset-icon-line path.stroke.tag-highway-bridleway {
.preset-icon-container path.stroke.tag-highway-bridleway {
stroke: #fff;
}
@@ -526,10 +526,10 @@ path.line.stroke.tag-highway-bridleway,
color: rgb(229, 184, 43);
}
path.line.stroke.tag-leisure-track,
.preset-icon-line path.casing.tag-highway.tag-leisure-track {
.preset-icon-container path.casing.tag-highway.tag-leisure-track {
stroke: rgb(229, 184, 43);
}
.preset-icon-line path.line.stroke.tag-highway.tag-leisure-track {
.preset-icon-container path.line.stroke.tag-highway.tag-leisure-track {
stroke: #fff;
}
@@ -552,10 +552,10 @@ path.line.casing.tag-highway-steps.tag-unpaved {
stroke-dasharray: none;
}
path.line.stroke.tag-highway-steps,
.preset-icon-line path.line.casing.tag-highway-steps {
.preset-icon-container path.line.casing.tag-highway-steps {
stroke: #81d25c;
}
.preset-icon-line path.line.stroke.tag-highway-steps {
.preset-icon-container path.line.stroke.tag-highway-steps {
stroke: #fff;
}
+1 -1
View File
@@ -83,6 +83,6 @@ path.line.stroke.tag-aeroway-runway {
stroke-width: 2;
stroke-dasharray: 12, 24;
}
.preset-icon-line path.line.stroke.tag-aeroway-runway {
.preset-icon-container path.line.stroke.tag-aeroway-runway {
stroke-dasharray: 0, 14, 8, 14;
}
+1 -1
View File
@@ -33,7 +33,7 @@ path.line.stroke.tag-railway {
stroke-width: 2;
stroke-dasharray: 6,6;
}
.preset-icon-line path.line.stroke.tag-railway:not(.tag-status) {
.preset-icon-container path.line.stroke.tag-railway:not(.tag-status) {
stroke-dasharray: 6;
}
+8 -8
View File
@@ -74,7 +74,7 @@ path.line.stroke.tag-route-ferry {
stroke-width: 12;
}
.low-zoom path.line.stroke.tag-route-ferry,
.preset-icon-line path.line.stroke.tag-route-ferry {
.preset-icon-container path.line.stroke.tag-route-ferry {
stroke-width: 2;
stroke-dasharray: 6,4;
}
@@ -163,7 +163,7 @@ path.line.casing.tag-man_made-pipeline {
.low-zoom path.line.stroke.tag-man_made-pipeline {
stroke-dasharray: 40, 1;
}
.preset-icon-line path.line.stroke.tag-man_made-pipeline {
.preset-icon-container path.line.stroke.tag-man_made-pipeline {
stroke-dasharray: 19, 1;
}
@@ -190,7 +190,7 @@ path.line.casing.tag-boundary-national_park {
path.line.stroke.tag-barrier:not(.tag-barrier-hedge) {
stroke: #ddd;
}
.preset-icon-line path.line.stroke.tag-barrier:not(.tag-barrier-hedge) {
.preset-icon-container path.line.stroke.tag-barrier:not(.tag-barrier-hedge) {
stroke: rgb(170, 170, 170);
}
path.line.casing.tag-natural,
@@ -213,9 +213,9 @@ path.line.stroke.tag-man_made-breakwater {
stroke-linecap: butt;
stroke-dasharray: 8, 2, 2, 2;
}
.preset-icon-line path.line.stroke.tag-barrier,
.preset-icon-line path.line.stroke.tag-man_made-groyne,
.preset-icon-line path.line.stroke.tag-man_made-breakwater {
.preset-icon-container path.line.stroke.tag-barrier,
.preset-icon-container path.line.stroke.tag-man_made-groyne,
.preset-icon-container path.line.stroke.tag-man_made-breakwater {
stroke-dasharray: 1, 4, 6, 4;
}
@@ -387,11 +387,11 @@ path.line.stroke.tag-highway.tag-status.tag-status-construction {
stroke-dasharray: 10, 10;
}
path.line.casing.tag-highway.tag-status.tag-status-construction,
.preset-icon-line path.line.stroke.tag-highway.tag-status.tag-status-construction {
.preset-icon-container path.line.stroke.tag-highway.tag-status.tag-status-construction {
stroke: #fff;
}
path.line.stroke.tag-highway.tag-status.tag-status-construction,
.preset-icon-line path.line.casing.tag-highway.tag-status.tag-status-construction {
.preset-icon-container path.line.casing.tag-highway.tag-status.tag-status-construction {
stroke: #fc6c14;
}
.low-zoom path.line.shadow.tag-highway.tag-status.tag-status-construction {
+10 -13
View File
@@ -1202,21 +1202,16 @@ a.hide-toggle {
.preset-icon-line {
margin: auto;
position: absolute;
left: 0;
right: 0;
top: 0;
width: 100%;
height: 100%;
}
[dir='ltr'] .preset-icon-line {
left: 0;
}
[dir='rtl'] .preset-icon-line {
right: 0;
}
.preset-icon-line path.line {
.preset-icon-container path {
cursor: inherit;
}
.preset-icon-line circle.vertex,
.preset-icon-fill circle.vertex {
.preset-icon-container circle.vertex {
fill: #fff;
stroke: rgba(0, 0, 0, 0.25);
}
@@ -1225,10 +1220,10 @@ a.hide-toggle {
stroke: rgba(0, 0, 0, 0.25);
}
/* use a consistent stroke width */
.preset-icon-line path.line.stroke {
.preset-icon-container path.line.stroke {
stroke-width: 2 !important;
}
.preset-icon-line path.line.casing {
.preset-icon-container path.line.casing {
stroke-width: 4 !important;
}
@@ -1279,7 +1274,8 @@ a.hide-toggle {
.preset-icon.framed .icon {
transform: scale(0.4);
}
.preset-icon.framed.line-geom .icon {
.preset-icon.framed.line-geom .icon,
.preset-icon.framed.route-geom .icon {
top: 20%;
transform: translateY(-30%) scale(0.4);
}
@@ -1289,7 +1285,8 @@ a.hide-toggle {
.preset-icon-iD.framed .icon {
transform: scale(0.74);
}
.preset-icon-iD.framed.line-geom .icon {
.preset-icon-iD.framed.line-geom .icon,
.preset-icon-iD.framed.route-geom .icon {
transform: translateY(-30%) scale(0.74);
}
.preset-icon-container.fallback .preset-icon .icon {