From 759ba5ca5db42f40e9f736dc195f94cba7513535 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ko=C4=87?= Date: Tue, 27 Sep 2016 05:53:16 +0200 Subject: [PATCH] Adding name and ref for railway=subway_entrance --- project.mml | 4 ++-- project.yaml | 2 ++ stations.mss | 17 +++++++++++++++++ 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/project.mml b/project.mml index fffc90702c..3868bfb515 100644 --- a/project.mml +++ b/project.mml @@ -1373,7 +1373,7 @@ "srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over", "Datasource": { "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n way,\n name,\n railway,\n aerialway,\n CASE railway \n WHEN 'station' THEN 1 \n WHEN 'subway_entrance' THEN 3\n ELSE 2\n END\n AS prio\n FROM planet_osm_point\n WHERE railway IN ('station', 'halt', 'tram_stop', 'subway_entrance')\n OR aerialway = 'station'\n ORDER BY prio\n) AS stations", + "table": "(SELECT\n way,\n name,\n ref,\n railway,\n aerialway,\n CASE railway \n WHEN 'station' THEN 1 \n WHEN 'subway_entrance' THEN 3\n ELSE 2\n END\n AS prio\n FROM planet_osm_point\n WHERE railway IN ('station', 'halt', 'tram_stop', 'subway_entrance')\n OR aerialway = 'station'\n ORDER BY prio\n) AS stations", "geometry_field": "way", "type": "postgis", "key_field": "", @@ -1399,7 +1399,7 @@ "srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over", "Datasource": { "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n way,\n name,\n railway,\n aerialway\nFROM planet_osm_polygon\nWHERE railway IN ('station', 'halt', 'tram_stop')\n OR aerialway = 'station'\n) AS stations_poly", + "table": "(SELECT\n way,\n name,\n ref,\n railway,\n aerialway\nFROM planet_osm_polygon\nWHERE railway IN ('station', 'halt', 'tram_stop')\n OR aerialway = 'station'\n) AS stations_poly", "geometry_field": "way", "type": "postgis", "key_field": "", diff --git a/project.yaml b/project.yaml index 29aa170535..ca775ff4f3 100644 --- a/project.yaml +++ b/project.yaml @@ -1651,6 +1651,7 @@ Layer: (SELECT way, name, + ref, railway, aerialway, CASE railway @@ -1678,6 +1679,7 @@ Layer: (SELECT way, name, + ref, railway, aerialway FROM planet_osm_polygon diff --git a/stations.mss b/stations.mss index a1cf20f2e8..f657dcc9f2 100644 --- a/stations.mss +++ b/stations.mss @@ -7,6 +7,23 @@ marker-placement: interior; marker-fill: @transportation-icon; marker-clip: false; + [zoom >= 19] { + text-name: [name]; + ["ref" != null] { + text-name: [ref]; + ["name" != null] { + text-name: [name] + "\n" + [ref]; + } + } + text-face-name: @book-fonts; + text-size: 10; + text-fill: @station-color; + text-dy: 10; + text-halo-radius: @standard-halo-radius * 1.5; + text-halo-fill: @standard-halo-fill; + text-wrap-width: 0; + text-placement: interior; + } } [railway = 'station'][zoom >= 12] {