Skip to content

Commit

Permalink
render shared paths differently
Browse files Browse the repository at this point in the history
  • Loading branch information
k-yle committed May 25, 2024
1 parent 010a812 commit 15c25c2
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 8 deletions.
21 changes: 21 additions & 0 deletions css/30_highways.css
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,27 @@ path.line.stroke.tag-highway-cycleway,
stroke: #fff;
}

/* shared paths */
path.line.casing.tag-highway-cycleway.tag-bicycle-designated.tag-foot-designated:not(.tag-crossing),
path.line.casing.tag-highway-path.tag-bicycle-designated.tag-foot-designated:not(.tag-crossing) {
stroke: #fff;
}
.preset-icon .icon.tag-highway-cycleway.tag-bicycle-designated.tag-foot-designated,
.preset-icon .icon.tag-highway-path.tag-bicycle-designated.tag-foot-designated {
color: #b458ed;
fill: #fff;
}
path.line.stroke.tag-highway-cycleway.tag-bicycle-designated.tag-foot-designated,
path.line.stroke.tag-highway-path.tag-bicycle-designated.tag-foot-designated,
.preset-icon-container path.casing.tag-highway-cycleway.tag-bicycle-designated.tag-foot-designated,
.preset-icon-container path.casing.tag-highway-path.tag-bicycle-designated.tag-foot-designated {
stroke: #b458ed;
}
.preset-icon-container path.stroke.tag-highway-cycleway.tag-bicycle-designated.tag-foot-designated:not(.tag-crossing),
.preset-icon-container path.stroke.tag-highway-path.tag-bicycle-designated.tag-foot-designated:not(.tag-crossing) {
stroke: #fff;
}

/* bridleways */
.preset-icon .icon.tag-route-horse,
.preset-icon .icon.tag-highway-bridleway {
Expand Down
10 changes: 2 additions & 8 deletions modules/svg/tag_classes.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export function svgTagClasses() {
'oneway', 'bridge', 'tunnel', 'embankment', 'cutting', 'barrier',
'surface', 'tracktype', 'footway', 'crossing', 'service', 'sport',
'public_transport', 'location', 'parking', 'golf', 'type', 'leisure',
'man_made', 'indoor', 'construction', 'proposed'
'man_made', 'indoor', 'construction', 'proposed', 'bicycle', 'foot'
];
var _tags = function(entity) { return entity.tags; };

Expand Down Expand Up @@ -61,16 +61,10 @@ export function svgTagClasses() {

// pick at most one primary classification tag..
for (i = 0; i < primaries.length; i++) {
k = primaries[i];
k = primaries[i].replace(":", "_");
v = t[k];
if (!v || v === 'no') continue;

if (k === 'piste:type') { // avoid a ':' in the class name
k = 'piste';
} else if (k === 'building:part') { // avoid a ':' in the class name
k = 'building_part';
}

primary = k;
if (statuses.indexOf(v) !== -1) { // e.g. `railway=abandoned`
status = v;
Expand Down

0 comments on commit 15c25c2

Please sign in to comment.