diff --git a/global.yaml b/global.yaml index c624fa8..51963d3 100644 --- a/global.yaml +++ b/global.yaml @@ -25,6 +25,7 @@ global: boundary_color: '#e66' + oneway_arrow_color: '#444' name_source: | function() { // Use preferred language label if available @@ -68,3 +69,10 @@ fonts: url: fonts/Montserrat-Medium.woff - weight: 700 url: fonts/Montserrat-Bold.woff + +textures: + oneway-arrow: + url: images/oneway_arrow@2x.png + # url: https://raw.githubusercontent.com/ENT8R/streetcomplete-mapstyle/master/images/oneway_arrow@2x.png + filtering: mipmap + density: 5 diff --git a/images/oneway_arrow@2x.png b/images/oneway_arrow@2x.png new file mode 100644 index 0000000..48f9bdb Binary files /dev/null and b/images/oneway_arrow@2x.png differ diff --git a/layers/roads.yaml b/layers/roads.yaml index 280bc81..b7a60da 100644 --- a/layers/roads.yaml +++ b/layers/roads.yaml @@ -112,6 +112,20 @@ layers: color: global.path_outline_color width: function () { return 1/4 * Math.log($zoom); } order: 200 + + oneway: + filter: { oneway: yes, $zoom: { min: 17 } } + draw: + oneway-arrow: + flat: true + buffer: 2px + color: global.oneway_arrow_color + size: [[17, [6px, auto]], [20, [24px, auto]]] + placement: spaced + placement_spacing: [[17, 40px], [20, 120px]] + angle: auto + text: + visible: false styles: step_dashes: base: lines @@ -120,3 +134,6 @@ styles: lines-railway-style: base: lines blend: opaque + oneway-arrow: + base: points + texture: oneway-arrow diff --git a/streetcomplete-dark-style.yaml b/streetcomplete-dark-style.yaml index d6f5d39..840985d 100644 --- a/streetcomplete-dark-style.yaml +++ b/streetcomplete-dark-style.yaml @@ -34,6 +34,7 @@ global: boundary_color: '#e46' + oneway_arrow_color: '#ccf' styles: lines-railway-style: base: lines diff --git a/streetcomplete-light-style.yaml b/streetcomplete-light-style.yaml index a22b5a0..4fe613c 100644 --- a/streetcomplete-light-style.yaml +++ b/streetcomplete-light-style.yaml @@ -31,6 +31,7 @@ global: boundary_color: '#e66' + oneway_arrow_color: '#444' styles: buildings-style: base: polygons