# HG changeset patch # User Teemu Piippo # Date 1601073017 -10800 # Node ID 0575190fa5fce410d701c09767e3eac7d78ec428 # Parent 63cfc4b10f9c5ae216af996ebfc5ce2989f822e2 better train station rendering diff -r 63cfc4b10f9c -r 0575190fa5fc project.mml --- a/project.mml Sat Sep 26 00:55:58 2020 +0300 +++ b/project.mml Sat Sep 26 01:30:17 2020 +0300 @@ -448,7 +448,9 @@ name, bilingual_name, railway, - tags->'railway:ref' AS ref + COALESCE(tags->'network', 'FI:local') AS network, + tags->'railway:ref' AS ref, + (CASE WHEN tags->'station' = 'subway' THEN 1 ELSE 0 END) AS subway FROM planet_osm_point WHERE "railway" IN ('station', 'halt') ) AS train_stations diff -r 63cfc4b10f9c -r 0575190fa5fc style/amenity.mss --- a/style/amenity.mss Sat Sep 26 00:55:58 2020 +0300 +++ b/style/amenity.mss Sat Sep 26 01:30:17 2020 +0300 @@ -35,10 +35,26 @@ #train-stations { - [zoom >= 12] + [zoom >= 9][zoom < 11][subway = 0][network = 'FI:national'], + [zoom >= 10][zoom < 12][subway = 0][network = 'FI:regional'], + [zoom >= 13][zoom < 15][subway = 1], + [zoom >= 13][zoom < 15][network = 'FI:local'], + { + marker-file: url('symbols/square.svg'); + marker-fill: #354ba3; + [subway = 1] + { + marker-fill: #a36c35; + } + marker-width: 6; + marker-clip: false; + } + [zoom >= 11][subway = 0][network = 'FI:national'], + [zoom >= 12][subway = 0][network = 'FI:regional'], + [zoom >= 15] { text-name: "[ref]"; - [zoom >= 14] + [zoom >= 13] { text-name: "[bilingual_name]"; } @@ -54,7 +70,11 @@ [zoom >= 18] { text-size: 13; } text-face-name: "FreeSans Bold"; text-halo-radius: 1.5 * @standard-halo-radius; - text-halo-fill: blue; + text-halo-fill: #354ba3; + [subway = 1] + { + text-halo-fill: #a36c35; + } /* [zoom >= 16] { @@ -84,8 +104,8 @@ [zoom >= 17] { text-size: 12; } [zoom >= 18] { text-size: 13; } text-face-name: "FreeSans Bold"; - text-halo-radius: 0.75 * @standard-halo-radius; - text-halo-fill: @standard-halo-fill; + text-halo-radius: @standard-halo-radius; + text-halo-fill: white; } } @@ -105,8 +125,8 @@ [zoom >= 18] { text-size: 12; } [zoom >= 19] { text-size: 13; } text-face-name: "FreeSans Bold"; - text-halo-radius: @standard-halo-radius; - text-halo-fill: @standard-halo-fill; + text-halo-radius: 1.25 * @standard-halo-radius; + text-halo-fill: white; } } diff -r 63cfc4b10f9c -r 0575190fa5fc style/roads.mss --- a/style/roads.mss Sat Sep 26 00:55:58 2020 +0300 +++ b/style/roads.mss Sat Sep 26 01:30:17 2020 +0300 @@ -551,13 +551,13 @@ { shield-name: "[ref]"; shield-size: 12; - shield-fill: blue; + shield-fill: white; + shield-halo-fill: #354ba3; shield-spacing: 300; shield-clip: false; shield-placement: line; shield-face-name: @railway-fonts-bold; shield-halo-radius: @standard-halo-radius * 2; - shield-halo-fill: white; shield-file: url('empty.png'); shield-repeat-distance: 10; }