tile_style: add more landuse, buildings

This commit is contained in:
Astro 2021-08-28 23:40:12 +02:00
parent f59d4da577
commit cb8d258e7e
1 changed files with 21 additions and 9 deletions

View File

@ -61,30 +61,42 @@ const STYLES: &[(Selector, Style)] = &[
Style { z_index: -9, fill: Some((0.3, 0.3, 0.2, 0.8)), ..Style::DEFAULT }),
(Selector::TagEquals("landuse", "construction"),
Style { z_index: -9, fill: Some((0.5, 0.5, 0.3, 0.8)), ..Style::DEFAULT }),
(Selector::TagEquals("landuse", "allotments"),
Style { z_index: -9, fill: Some((0.2, 0.6, 0.2, 0.8)), stroke: Some((0.5, (0.4, 0.4, 0.4, 1.0))), ..Style::DEFAULT }),
(Selector::TagEquals("highway", "motorway"),
(Selector::And(&[Selector::TagEquals("highway", "motorway"), Selector::MinZoom(4)]),
Style { z_index: 10, stroke: Some((50., (1., 1., 1., 1.))), ..Style::DEFAULT }),
(Selector::TagEquals("highway", "trunk"),
(Selector::And(&[Selector::TagEquals("highway", "trunk"), Selector::MinZoom(6)]),
Style { z_index: 9, stroke: Some((35., (1., 1., 1., 1.))), ..Style::DEFAULT }),
(Selector::TagEquals("highway", "primary"),
(Selector::And(&[Selector::TagEquals("highway", "primary"), Selector::MinZoom(6)]),
Style { z_index: 8, stroke: Some((25., (1., 1., 1., 1.))), ..Style::DEFAULT }),
(Selector::And(&[Selector::TagEquals("highway", "secondary"), Selector::MinZoom(12)]),
(Selector::And(&[Selector::TagEquals("highway", "secondary"), Selector::MinZoom(8)]),
Style { z_index: 7, stroke: Some((20., (1., 1., 1., 1.))), ..Style::DEFAULT }),
(Selector::And(&[Selector::TagEquals("highway", "tertiary"), Selector::MinZoom(14)]),
(Selector::And(&[Selector::TagEquals("highway", "tertiary"), Selector::MinZoom(10)]),
Style { z_index: 6, stroke: Some((15., (1., 1., 1., 1.))), ..Style::DEFAULT }),
(Selector::And(&[Selector::TagEquals("highway", "residential"), Selector::MinZoom(16)]),
(Selector::And(&[Selector::TagEquals("highway", "residential"), Selector::MinZoom(14)]),
Style { z_index: 5, stroke: Some((10., (1., 1., 1., 1.))), ..Style::DEFAULT }),
(Selector::And(&[Selector::TagEquals("highway", "living_street"), Selector::MinZoom(16)]),
(Selector::And(&[Selector::TagEquals("highway", "living_street"), Selector::MinZoom(14)]),
Style { z_index: 4, stroke: Some((8., (1., 1., 1., 1.))), ..Style::DEFAULT }),
(Selector::And(&[Selector::HasTag("highway"), Selector::MinZoom(18)]),
(Selector::And(&[Selector::HasTag("highway"), Selector::MinZoom(16)]),
Style { z_index: 3, stroke: Some((6., (1., 1., 1., 1.))), ..Style::DEFAULT }),
(Selector::And(&[Selector::HasTag("railway"), Selector::MinZoom(10)]),
(Selector::And(&[Selector::TagEquals("railway", "rail"), Selector::MinZoom(10)]),
Style { z_index: 20, stroke: Some((3., (0., 0., 0., 1.))), ..Style::DEFAULT }),
(Selector::And(&[Selector::TagEquals("railway", "tram"), Selector::MinZoom(14)]),
Style { z_index: 20, stroke: Some((3., (0., 0., 0., 1.))), ..Style::DEFAULT }),
(Selector::Or(&[Selector::HasTag("waterway"), Selector::TagEquals("natural", "water")]),
Style { z_index: -2, fill: Some((0.5, 0.5, 0.7, 1.)), ..Style::DEFAULT }),
(Selector::And(&[Selector::TagEquals("building", "industrial"), Selector::MinZoom(16)]),
Style { z_index: 30, fill: Some((0.4, 0.4, 0.4, 1.)), stroke: Some((1., (0., 0., 0., 1.))), ..Style::DEFAULT }),
(Selector::And(&[Selector::TagEquals("building", "warehouse"), Selector::MinZoom(16)]),
Style { z_index: 30, fill: Some((0.4, 0.4, 0.4, 1.)), stroke: Some((1., (0., 0., 0., 1.))), ..Style::DEFAULT }),
(Selector::And(&[Selector::TagEquals("building", "supermarket"), Selector::MinZoom(16)]),
Style { z_index: 30, fill: Some((0.5, 0.5, 0.5, 1.)), stroke: Some((1., (0., 0., 0., 1.))), ..Style::DEFAULT }),
(Selector::And(&[Selector::TagEquals("building", "commercial"), Selector::MinZoom(16)]),
Style { z_index: 30, fill: Some((0.5, 0.5, 0.5, 1.)), stroke: Some((1., (0., 0., 0., 1.))), ..Style::DEFAULT }),
(Selector::And(&[Selector::HasTag("building"), Selector::MinZoom(16)]),
Style { z_index: 30, fill: Some((0.7, 0.7, 0.7, 1.)), stroke: Some((1., (0., 0., 0., 1.))), ..Style::DEFAULT }),
];