Skip to content

Commit

Permalink
Start showing water labels earlier
Browse files Browse the repository at this point in the history
  • Loading branch information
kocio-pl committed Sep 24, 2017
1 parent 16444a9 commit 5d119ab
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -1879,7 +1879,7 @@ Layer:
way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels,
COALESCE(
'landuse_' || CASE WHEN landuse IN ('forest', 'military', 'farmland') THEN landuse ELSE NULL END,
'natural_' || CASE WHEN "natural" IN ('wood', 'glacier', 'sand', 'scree', 'shingle', 'bare_rock') THEN "natural" ELSE NULL END,
'natural_' || CASE WHEN "natural" IN ('wood', 'glacier', 'sand', 'scree', 'shingle', 'bare_rock', 'water') THEN "natural" ELSE NULL END,
'place_' || CASE WHEN place IN ('island') THEN place ELSE NULL END,
'boundary_' || CASE WHEN boundary IN ('national_park') THEN boundary ELSE NULL END,
'leisure_' || CASE WHEN leisure IN ('nature_reserve') THEN leisure ELSE NULL END
Expand All @@ -1888,7 +1888,7 @@ Layer:
CASE WHEN building = 'no' OR building IS NULL THEN 'no' ELSE 'yes' END AS is_building -- always no with the where conditions
FROM planet_osm_polygon
WHERE (landuse IN ('forest', 'military', 'farmland')
OR "natural" IN ('wood', 'glacier', 'sand', 'scree', 'shingle', 'bare_rock')
OR "natural" IN ('wood', 'glacier', 'sand', 'scree', 'shingle', 'bare_rock', 'water')
OR "place" IN ('island')
OR boundary IN ('national_park')
OR leisure IN ('nature_reserve'))
Expand All @@ -1897,7 +1897,7 @@ Layer:
ORDER BY way_area DESC
) AS text_poly_low_zoom
properties:
minzoom: 7
minzoom: 6
maxzoom: 9
- id: text-poly
class: text
Expand Down
3 changes: 2 additions & 1 deletion water.mss
Original file line number Diff line number Diff line change
Expand Up @@ -313,12 +313,13 @@
}
}

.text-low-zoom[zoom < 10],
.text[zoom >= 10] {
[feature = 'natural_water'],
[feature = 'landuse_reservoir'],
[feature = 'landuse_basin'],
[feature = 'waterway_dock'] {
[zoom >= 10][way_pixels > 3000],
[zoom >= 6][way_pixels > 3000],
[zoom >= 17] {
text-name: "[name]";
text-size: 10;
Expand Down

0 comments on commit 5d119ab

Please sign in to comment.