Skip to content

Commit

Permalink
Remove way_area filtering for low zoom water (#4060)
Browse files Browse the repository at this point in the history
Remove way_area filtering for low zoom water. Areas above 1 pixel square will now render.
Clean up code to simplify rendering of water areas. Now waterway=dock and landuse=basin will be the same as the other features.
  • Loading branch information
jeisenbe authored Mar 19, 2020
1 parent b3ecdb7 commit e380338
Showing 1 changed file with 12 additions and 59 deletions.
71 changes: 12 additions & 59 deletions style/water.mss
Original file line number Diff line number Diff line change
Expand Up @@ -17,67 +17,20 @@
}
}

[waterway = 'dock'] {
[zoom >= 9]::waterway {
[waterway = 'dock'],
[landuse = 'basin'],
[natural = 'water'],
[landuse = 'reservoir'],
[waterway = 'riverbank'] {
[int_intermittent = 'no'] {
polygon-fill: @water-color;
[way_pixels >= 4] {
polygon-gamma: 0.75;
}
[way_pixels >= 64] {
polygon-gamma: 0.6;
}
}
}

[landuse = 'basin']::landuse {
[zoom >= 7][way_pixels >= 32],
[zoom >= 8] {
[int_intermittent = 'no'] {
polygon-fill: @water-color;
[way_pixels >= 4] {
polygon-gamma: 0.75;
}
[way_pixels >= 64] {
polygon-gamma: 0.6;
}
}
[int_intermittent = 'yes'] {
polygon-pattern-file: url('symbols/intermittent_water.png');
[way_pixels >= 4] {
polygon-pattern-gamma: 0.75;
}
[way_pixels >= 64] {
polygon-pattern-gamma: 0.6;
}
}
[way_pixels >= 4] { polygon-gamma: 0.75; }
[way_pixels >= 64] { polygon-gamma: 0.6; }
}
}

[natural = 'water']::natural,
[landuse = 'reservoir']::landuse,
[waterway = 'riverbank']::waterway {
[zoom >= 0][zoom < 1][way_pixels >= 4],
[zoom >= 1][zoom < 2][way_pixels >= 16],
[zoom >= 2][zoom < 8][way_pixels >= 32],
[zoom >= 8] {
[int_intermittent = 'no'] {
polygon-fill: @water-color;
[way_pixels >= 4] {
polygon-gamma: 0.75;
}
[way_pixels >= 64] {
polygon-gamma: 0.6;
}
}
[int_intermittent = 'yes'] {
polygon-pattern-file: url('symbols/intermittent_water.png');
[way_pixels >= 4] {
polygon-pattern-gamma: 0.75;
}
[way_pixels >= 64] {
polygon-pattern-gamma: 0.6;
}
}
[int_intermittent = 'yes'] {
polygon-pattern-file: url('symbols/intermittent_water.png');
[way_pixels >= 4] { polygon-pattern-gamma: 0.75; }
[way_pixels >= 64] { polygon-pattern-gamma: 0.6; }
}
}
}
Expand Down

0 comments on commit e380338

Please sign in to comment.