diff -r 34a84c0a427c -r 63cfc4b10f9c project.mml --- a/project.mml Sat Sep 26 00:55:46 2020 +0300 +++ b/project.mml Sat Sep 26 00:55:58 2020 +0300 @@ -300,6 +300,20 @@ table: *road_sql properties: minzoom: 10 + - id: bus-route-layer-n1 + geometry: linestring + <<: *extents + Datasource: + <<: *osm2pgsql + table: &bus_routes_sql |- + (SELECT DISTINCT + way, + COALESCE(layer::integer, 0) AS layer + FROM planet_osm_routes + WHERE "route" = 'bus' + ) AS bus_routes + properties: + minzoom: 15 - id: rail-layer-n1 geometry: linestring Datasource: @@ -343,6 +357,14 @@ table: *road_sql properties: minzoom: 12 + - id: bus-route + geometry: linestring + <<: *extents + Datasource: + <<: *osm2pgsql + table: *bus_routes_sql + properties: + minzoom: 15 - id: rail geometry: linestring Datasource: @@ -385,6 +407,14 @@ table: *road_sql properties: minzoom: 12 + - id: bus-route-layer-1 + geometry: linestring + <<: *extents + Datasource: + <<: *osm2pgsql + table: *bus_routes_sql + properties: + minzoom: 15 - id: rail-layer-1 geometry: linestring Datasource: @@ -888,3 +918,18 @@ ) AS commuter_trains properties: minzoom: 15 + - id: bus-ref + geometry: linestring + <<: *extents + Datasource: + <<: *osm2pgsql + table: |- + (SELECT + way, + ref + FROM planet_osm_routes + WHERE "route" = 'bus' AND ref IS NOT NULL + ORDER BY ref + ) AS commuter_trains + properties: + minzoom: 17