Skip to content

Commit

Permalink
use chroma and hues from casing colour for oneway arrows
Browse files Browse the repository at this point in the history
  • Loading branch information
nebulon42 committed Sep 19, 2015
1 parent ad285ad commit 078f3c8
Show file tree
Hide file tree
Showing 3 changed files with 123 additions and 45 deletions.
104 changes: 59 additions & 45 deletions roads.mss
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,12 @@
@paths-bridge-casing-width: 0.5;
@paths-tunnel-casing-width: 1;

@oneway-arrow-color: #404040;
@junction-text-color: #960000;
@motorway-oneway-arrow-color: #970031; // Lch(27, 70, 10) derived from motorway-casing
@trunk-oneway-arrow-color: #850500; // Lch(27, 65, 42) derived from trunk-casing
@primary-oneway-arrow-color: #643400; // Lch(27, 60, 74) derived from primary-casing
@secondary-oneway-arrow-color: #3c4500; // Lch(27, 55, 106) derived from secondary-casing
@default-oneway-arrow-color: #404040;
@junction-text-color: #960000;
@halo-color-for-minor-road: white;

.roads-casing, .bridges-casing, .tunnels-casing {
Expand Down Expand Up @@ -2780,49 +2784,59 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */

.directions::directions {
[zoom >= 16] {
[oneway = 'yes'] {
dira/line-width: 1;
dira/line-dasharray: 0,12,10,152;
dira/line-color: @oneway-arrow-color;
dira/line-join: bevel;
dira/line-clip: false;
dirb/line-width: 2;
dirb/line-dasharray: 0,12,9,153;
dirb/line-color: @oneway-arrow-color;
dirb/line-join: bevel;
dirb/line-clip: false;
dirc/line-width: 3;
dirc/line-dasharray: 0,18,2,154;
dirc/line-color: @oneway-arrow-color;
dirc/line-join: bevel;
dirc/line-clip: false;
dird/line-width: 4;
dird/line-dasharray: 0,18,1,155;
dird/line-color: @oneway-arrow-color;
dird/line-join: bevel;
dird/line-clip: false;
}
[oneway = '-1'] {
dira/line-width: 1;
dira/line-dasharray: 0,12,10,152;
dira/line-color: @oneway-arrow-color;
dira/line-join: bevel;
dira/line-clip: false;
dirb/line-width: 2;
dirb/line-dasharray: 0,13,9,152;
dirb/line-color: @oneway-arrow-color;
dirb/line-join: bevel;
dirb/line-clip: false;
dirc/line-width: 3;
dirc/line-dasharray: 0,14,2,158;
dirc/line-color: @oneway-arrow-color;
dirc/line-join: bevel;
dirc/line-clip: false;
dird/line-width: 4;
dird/line-dasharray: 0,15,1,158;
dird/line-color: @oneway-arrow-color;
dird/line-join: bevel;
dird/line-clip: false;
// omitting highway_: platform, construction
[feature = 'highway_motorway'],
[feature = 'highway_motorway_link'],
[feature = 'highway_trunk'],
[feature = 'highway_trunk_link'],
[feature = 'highway_primary'],
[feature = 'highway_primary_link'],
[feature = 'highway_secondary'],
[feature = 'highway_secondary_link'],
[feature = 'highway_tertiary'],
[feature = 'highway_tertiary_link'],
[feature = 'highway_residential'],
[feature = 'highway_unclassified'],
[feature = 'highway_living_street'],
[feature = 'highway_road'],
[feature = 'highway_service'],
[feature = 'highway_raceway'],
[feature = 'highway_bridleway'],
[feature = 'highway_cycleway'],
[feature = 'highway_track'],
[feature = 'highway_pedestrian'],
[feature = 'highway_footway'],
[feature = 'highway_path'],
[feature = 'highway_steps'] {
[oneway = 'yes'],
[oneway = '-1'] {
marker-placement: line;
marker-spacing: 180;
marker-max-error: 0.5;
marker-fill: @default-oneway-arrow-color;

marker-file: url('symbols/oneway.svg');
[oneway = '-1'] {
marker-file: url('symbols/oneway-reverse.svg');
}

[feature = 'highway_motorway'],
[feature = 'highway_motorway_link'] {
marker-fill: @motorway-oneway-arrow-color;
}
[feature = 'highway_trunk'],
[feature = 'highway_trunk_link'] {
marker-fill: @trunk-oneway-arrow-color;
}
[feature = 'highway_primary'],
[feature = 'highway_primary_link'] {
marker-fill: @primary-oneway-arrow-color;
}
[feature = 'highway_secondary'],
[feature = 'highway_secondary_link'] {
marker-fill: @secondary-oneway-arrow-color;
}
}
}
}
}
32 changes: 32 additions & 0 deletions symbols/oneway-reverse.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 32 additions & 0 deletions symbols/oneway.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 078f3c8

Please sign in to comment.