Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Render ocean areas lighter, and river areas and lines darker #4128

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions project.mml
Expand Up @@ -232,6 +232,7 @@ Layer:
(SELECT
way,
"natural",
water,
waterway,
landuse,
way_area/NULLIF(POW(!scale_denominator!*0.001*0.28,2),0) AS way_pixels,
Expand Down
4 changes: 3 additions & 1 deletion style/ferry-routes.mss
Expand Up @@ -4,8 +4,10 @@
#ferry-routes {
[zoom >= 8] {
/* background prevents problems with overlapping ferry-routes, see #457 */
background/line-color: @water-color;
background/line-color: @river-color;
background/line-width: 1; /* Needs to be a bit wider than the route itself because of antialiasing */
background/line-comp-op: lighten;
background/line-dasharray: 4,4;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The idea of a background line is that it covers the dashes that are in an different position from another ferry line. Using dashes for the background line defeats the purpose, it should just be solid.

line-color: @ferry-route;
line-width: 0.4;
line-dasharray: 4,4;
Expand Down
2 changes: 1 addition & 1 deletion style/landcover.mss
Expand Up @@ -77,7 +77,7 @@
::high-zoom[zoom >= 12] {

[feature = 'leisure_swimming_pool'][zoom >= 14] {
polygon-fill: @water-color;
polygon-fill: @ocean-color;
[zoom >= 17] {
line-width: 0.5;
line-color: saturate(darken(@water-color, 20%), 20%);
Expand Down
2 changes: 1 addition & 1 deletion style/shapefiles.mss
Expand Up @@ -13,7 +13,7 @@

#ocean-lz,
#ocean {
polygon-fill: @water-color;
polygon-fill: @ocean-color;
}

#icesheet-poly {
Expand Down
5 changes: 4 additions & 1 deletion style/style.mss
Expand Up @@ -2,8 +2,11 @@ Map {
background-color: @land-color;
}

@water-color: #aad3df;
@land-color: #f2efe9;

@water-color: #a2d1e0; // Lch(81,17,227)
@ocean-color: #b5d7e3; // Lch(84,13,227)
@river-color: #8fcadd; // Lch(78,21,227)

@standard-halo-radius: 1;
@standard-halo-fill: rgba(255,255,255,0.6);
46 changes: 39 additions & 7 deletions style/water.mss
Expand Up @@ -18,10 +18,7 @@
}

[waterway = 'dock'],
[landuse = 'basin'],
[natural = 'water'],
[landuse = 'reservoir'],
[waterway = 'riverbank'] {
[landuse = 'basin'] {
[int_intermittent = 'no'] {
polygon-fill: @water-color;
[way_pixels >= 4] { polygon-gamma: 0.75; }
Expand All @@ -33,6 +30,41 @@
[way_pixels >= 64] { polygon-pattern-gamma: 0.6; }
}
}

[natural = 'water']::natural,
[landuse = 'reservoir']::landuse,
[waterway = 'riverbank']::waterway {
[water != 'river'][water != 'canal'][waterway != 'riverbank'] {
[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');
polygon-pattern-alignment: global;
[way_pixels >= 4] { polygon-pattern-gamma: 0.75; }
[way_pixels >= 64] { polygon-pattern-gamma: 0.6; }
}
}
[natural = 'water'][water = 'river'],
[natural = 'water'][water = 'canal'],
[waterway = 'riverbank'] {
[int_intermittent = 'no'] {
polygon-fill: @river-color;
[way_pixels >= 4] { polygon-gamma: 0.75; }
[way_pixels >= 64] { polygon-gamma: 0.6; }
}
[int_intermittent = 'yes'] {
[zoom >= 15] {
polygon-pattern-file: url('symbols/intermittent_river.png');
polygon-pattern-alignment: global;
[way_pixels >= 4] { polygon-pattern-gamma: 0.75; }
[way_pixels >= 64] { polygon-pattern-gamma: 0.6; }
}
}
}
}
}

#water-lines-casing {
Expand Down Expand Up @@ -66,7 +98,7 @@
line-join: round;
line-clip: false;
}
line-color: @water-color;
line-color: @river-color;
line-width: 0.7;
[zoom >= 9] { line-width: 1.2; }
[zoom >= 10] { line-width: 1.6; }
Expand Down Expand Up @@ -96,7 +128,7 @@
}
}

water/line-color: @water-color;
water/line-color: @river-color;
water/line-width: 2;
water/line-cap: round;
water/line-join: round;
Expand Down Expand Up @@ -154,7 +186,7 @@
background/line-color: @land-color;
}
water/line-width: 2;
water/line-color: @water-color;
water/line-color: @river-color;

[bridge = 'yes'] {
bridgecasing/line-color: black;
Expand Down