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

Simplify (generalize) admin borders #3103

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions admin.mss
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
@admin-boundaries: #ac46ac;

@admin-simplify: 4;
@admin-simplify-algorithm: visvalingam-whyatt;

/* For performance reasons, the admin border layers are split into three groups
for low, middle and high zoom levels.
For each zoomlevel, all borders come from a single attachment, to handle
Expand All @@ -14,9 +17,13 @@ overlapping borders correctly.
background/line-join: bevel;
background/line-color: white;
background/line-width: 1.2;
background/line-simplify: @admin-simplify;
background/line-simplify-algorithm: @admin-simplify-algorithm;
line-join: bevel;
line-color: @admin-boundaries;
line-width: 1.2;
line-simplify: @admin-simplify;
line-simplify-algorithm: @admin-simplify-algorithm;
}
[zoom >= 5] {
background/line-width: 1.5;
Expand All @@ -41,9 +48,13 @@ overlapping borders correctly.
background/line-join: bevel;
background/line-color: white;
background/line-width: 0.6;
background/line-simplify: @admin-simplify;
background/line-simplify-algorithm: @admin-simplify-algorithm;
line-join: bevel;
line-color: @admin-boundaries;
line-width: 0.6;
line-simplify: @admin-simplify;
line-simplify-algorithm: @admin-simplify-algorithm;
}
[zoom >= 7] {
background/line-width: 1.2;
Expand All @@ -62,9 +73,13 @@ overlapping borders correctly.
background/line-join: bevel;
background/line-color: white;
background/line-width: 0.4;
background/line-simplify: @admin-simplify;
background/line-simplify-algorithm: @admin-simplify-algorithm;
line-color: @admin-boundaries;
line-join: bevel;
line-width: 0.4;
line-simplify: @admin-simplify;
line-simplify-algorithm: @admin-simplify-algorithm;
line-clip: false;
}
[zoom >= 5] {
Expand Down Expand Up @@ -114,19 +129,27 @@ overlapping borders correctly.
background/line-join: bevel;
background/line-color: white;
background/line-width: 2;
background/line-simplify: @admin-simplify;
background/line-simplify-algorithm: @admin-simplify-algorithm;
line-join: bevel;
line-color: @admin-boundaries;
line-width: 2;
line-simplify: @admin-simplify;
line-simplify-algorithm: @admin-simplify-algorithm;
line-dasharray: 6,3,2,3,2,3;
line-clip: false;
}
[admin_level = '6'][zoom >= 11] {
background/line-join: bevel;
background/line-color: white;
background/line-width: 2;
background/line-simplify: @admin-simplify;
background/line-simplify-algorithm: @admin-simplify-algorithm;
line-join: bevel;
line-color: @admin-boundaries;
line-width: 2;
line-simplify: @admin-simplify;
line-simplify-algorithm: @admin-simplify-algorithm;
line-dasharray: 6,3,2,3;
line-clip: false;
}
Expand All @@ -136,9 +159,13 @@ overlapping borders correctly.
background/line-join: bevel;
background/line-color: white;
background/line-width: 1.5;
background/line-simplify: @admin-simplify;
background/line-simplify-algorithm: @admin-simplify-algorithm;
line-join: bevel;
line-color: @admin-boundaries;
line-width: 1.5;
line-simplify: @admin-simplify;
line-simplify-algorithm: @admin-simplify-algorithm;
line-dasharray: 5,2;
line-clip: false;
}
Expand All @@ -154,9 +181,13 @@ overlapping borders correctly.
background/line-join: bevel;
background/line-color: white;
background/line-width: 2;
background/line-simplify: @admin-simplify;
background/line-simplify-algorithm: @admin-simplify-algorithm;
line-join: bevel;
line-color: @admin-boundaries;
line-width: 2;
line-simplify: @admin-simplify;
line-simplify-algorithm: @admin-simplify-algorithm;
line-dasharray: 2,3;
line-clip: false;
}
Expand Down