diff --git a/power.mss b/power.mss index a617c3d977..0b9242a4b2 100644 --- a/power.mss +++ b/power.mss @@ -33,21 +33,20 @@ } #power-towers { - [zoom >= 14] { - marker-file: url('symbols/man_made/power_tower_small.svg'); - marker-width: 3; - } - [zoom >= 15] { - marker-file: url('symbols/man_made/power_tower.svg'); - marker-width: 5; - } - [zoom >= 17] { - marker-width: 7; + [power = 'tower'] { + [zoom >= 14] { + marker-file: url('symbols/man_made/power_tower_small.svg'); + marker-width: 3; + } + [zoom >= 15] { + marker-file: url('symbols/man_made/power_tower.svg'); + marker-width: 5; + } + [zoom >= 17] { + marker-width: 7; + } } -} - -#power-poles { - [zoom >= 16] { + [power = 'pole'][zoom >= 16] { marker-file: url('symbols/square.svg'); marker-fill: #928f8f; marker-width: 3; diff --git a/project.mml b/project.mml index 60261738de..595e9a0e5f 100644 --- a/project.mml +++ b/project.mml @@ -1707,25 +1707,19 @@ Layer: <<: *osm2pgsql table: |- (SELECT - way - FROM planet_osm_point - WHERE power = 'tower' + way, + power + FROM planet_osm_point + WHERE power IN ('tower', 'pole') + ORDER BY + CASE + WHEN power = 'tower' THEN 1 + WHEN power = 'pole' THEN 2 + ELSE NULL + END ) AS power_towers properties: minzoom: 14 - - id: power-poles - geometry: point - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way - FROM planet_osm_point - WHERE power = 'pole' - ) AS power_poles - properties: - minzoom: 16 - id: roads-text-ref-low-zoom geometry: linestring <<: *extents