Skip to content

Commit

Permalink
Merge pull request #3103 from matthijsmelissen/simplify-admin
Browse files Browse the repository at this point in the history
Simplify (generalize) admin borders
  • Loading branch information
matthijsmelissen authored Mar 9, 2018
2 parents d8fc3c7 + a4e5da8 commit fbc0252
Showing 1 changed file with 31 additions and 0 deletions.
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

0 comments on commit fbc0252

Please sign in to comment.