Sat, 26 Sep 2020 01:31:37 +0300
added square.svg from osm-carto
// Shield’s line wrap is based on OpenStreetMap data and not on line-wrap-width, // but lines are typically rather short, so we use narrow line spacing. @shield-size: 10; @shield-line-spacing: -2; // -1.50; // -0.15 em @shield-size-z16: 11; @shield-line-spacing-z16: -2.25; // -1.65; // -0.15 em @shield-size-z18: 12; @shield-line-spacing-z18: -2.5; // -1.80; // -0.15 em @shield-spacing: 760; @shield-repeat-distance: 400; @shield-margin: 40; @shield-font: "Liikenne Regular"; @shield-clip: false; #roads-text-ref { [highway = 'trunk'][zoom >= 13], [highway = 'primary'][zoom >= 13], [highway = 'secondary'][zoom >= 13], [highway = 'tertiary'][zoom >= 13], [ref_class_1 = 'valtatie'][zoom >= 8], [ref_class_1 = 'eurooppatie'][zoom >= 12], [ref_class_1 = 'kantatie'][zoom >= 10], [ref_class_1 = 'seututie'][zoom >= 12] { [ref_1 != null][ref_class_1 != null][ref_class_1 != 'unknown'] { shield-face-name: @shield-font; shield-file: url("symbols/shields/[ref_class_1]_[ref_length_1]x1.svg"); [ref_class_1 = 'valtatie'], [ref_class_1 = 'yhdystie'], [ref_class_1 = 'eurooppatie'] { shield-fill: white; } [ref_class_1 = 'kantatie'], [ref_class_1 = 'seututie'] { shield-fill: black; } shield-name: "[ref_1]"; shield-size: 12; shield-placement: line; shield-spacing: @shield-spacing; shield-repeat-distance: @shield-repeat-distance; shield-margin: @shield-margin; shield-clip: @shield-clip; } } } #roads-text-ref2 { [highway = 'trunk'][zoom >= 13], [highway = 'primary'][zoom >= 13], [highway = 'secondary'][zoom >= 13], [highway = 'tertiary'][zoom >= 13], [ref_class_2 = 'valtatie'][zoom >= 12], [ref_class_2 = 'eurooppatie'][zoom >= 12], [ref_class_2 = 'kantatie'][zoom >= 12], [ref_class_2 = 'seututie'][zoom >= 12] { [ref_2 != null][ref_class_2 != null][ref_class_2 != 'unknown'] { shield-face-name: @shield-font; shield-file: url("symbols/shields/[ref_class_2]_[ref_length_2]x1.svg"); [ref_class_2 = 'valtatie'], [ref_class_2 = 'yhdystie'], [ref_class_2 = 'eurooppatie'] { shield-fill: white; } [ref_class_2 = 'kantatie'], [ref_class_2 = 'seututie'] { shield-fill: black; } shield-name: "[ref_2]"; shield-size: 12; shield-placement: line; shield-spacing: @shield-spacing; shield-repeat-distance: @shield-repeat-distance; shield-margin: @shield-margin; shield-clip: @shield-clip; } } } #roads-text-ref3 { [highway = 'trunk'][zoom >= 13], [highway = 'primary'][zoom >= 13], [highway = 'secondary'][zoom >= 13], [highway = 'tertiary'][zoom >= 13], [ref_class_3 = 'valtatie'][zoom >= 12], [ref_class_3 = 'eurooppatie'][zoom >= 12], [ref_class_3 = 'kantatie'][zoom >= 12], [ref_class_3 = 'seututie'][zoom >= 12] { [ref_3 != null][ref_class_3 != null][ref_class_3 != 'unknown'] { shield-face-name: @shield-font; shield-file: url("symbols/shields/[ref_class_3]_[ref_length_3]x1.svg"); [ref_class_3 = 'valtatie'], [ref_class_3 = 'yhdystie'], [ref_class_3 = 'eurooppatie'] { shield-fill: white; } [ref_class_3 = 'kantatie'], [ref_class_3 = 'seututie'] { shield-fill: black; } shield-name: "[ref_3]"; shield-size: 12; shield-placement: line; shield-spacing: @shield-spacing; shield-repeat-distance: @shield-repeat-distance; shield-margin: @shield-margin; shield-clip: @shield-clip; } } } #roads-text-ref4 { [highway = 'trunk'][zoom >= 13], [highway = 'primary'][zoom >= 13], [highway = 'secondary'][zoom >= 13], [highway = 'tertiary'][zoom >= 13], [ref_class_4 = 'valtatie'][zoom >= 10], [ref_class_4 = 'eurooppatie'][zoom >= 11], [ref_class_4 = 'kantatie'][zoom >= 11], [ref_class_4 = 'seututie'][zoom >= 12] { [ref_4 != null][ref_class_4 != null][ref_class_4 != 'unknown'] { shield-face-name: @shield-font; shield-file: url("symbols/shields/[ref_class_4]_[ref_length_4]x1.svg"); [ref_class_4 = 'valtatie'], [ref_class_4 = 'yhdystie'], [ref_class_4 = 'eurooppatie'] { shield-fill: white; } [ref_class_4 = 'kantatie'], [ref_class_4 = 'seututie'] { shield-fill: black; } shield-name: "[ref_4]"; shield-size: 12; shield-placement: line; shield-spacing: @shield-spacing; shield-repeat-distance: @shield-repeat-distance; shield-margin: @shield-margin; shield-clip: @shield-clip; } } } #roads-text-ref5 { [highway = 'trunk'][zoom >= 13], [highway = 'primary'][zoom >= 13], [highway = 'secondary'][zoom >= 13], [highway = 'tertiary'][zoom >= 13], [ref_class_5 = 'valtatie'][zoom >= 12], [ref_class_5 = 'eurooppatie'][zoom >= 12], [ref_class_5 = 'kantatie'][zoom >= 12], [ref_class_5 = 'seututie'][zoom >= 12] { [ref_5 != null][ref_class_5 != null][ref_class_5 != 'unknown'] { shield-face-name: @shield-font; shield-file: url("symbols/shields/[ref_class_5]_[ref_length_5]x1.svg"); [ref_class_5 = 'valtatie'], [ref_class_5 = 'yhdystie'], [ref_class_5 = 'eurooppatie'] { shield-fill: white; } [ref_class_5 = 'kantatie'], [ref_class_5 = 'seututie'] { shield-fill: black; } shield-name: "[ref_5]"; shield-size: 12; shield-placement: line; shield-spacing: @shield-spacing; shield-repeat-distance: @shield-repeat-distance; shield-margin: @shield-margin; shield-clip: @shield-clip; } } } #roads-text-ref6 { [highway = 'trunk'][zoom >= 13], [highway = 'primary'][zoom >= 13], [highway = 'secondary'][zoom >= 13], [highway = 'tertiary'][zoom >= 13], [ref_class_6 = 'valtatie'][zoom >= 10], [ref_class_6 = 'eurooppatie'][zoom >= 12], [ref_class_6 = 'kantatie'][zoom >= 12], [ref_class_6 = 'seututie'][zoom >= 12] { [ref_6 != null][ref_class_6 != null][ref_class_6 != 'unknown'] { shield-face-name: @shield-font; shield-file: url("symbols/shields/[ref_class_6]_[ref_length_6]x1.svg"); [ref_class_6 = 'valtatie'], [ref_class_6 = 'yhdystie'], [ref_class_6 = 'eurooppatie'] { shield-fill: white; } [ref_class_6 = 'kantatie'], [ref_class_6 = 'seututie'] { shield-fill: black; } shield-name: "[ref_6]"; shield-size: 12; shield-placement: line; shield-spacing: @shield-spacing; shield-repeat-distance: @shield-repeat-distance; shield-margin: @shield-margin; shield-clip: @shield-clip; } } }