Skip to content

Instantly share code, notes, and snippets.

@milesgrimshaw
Created June 20, 2015 21:52
Show Gist options
  • Save milesgrimshaw/3712fd97e87e788f93d0 to your computer and use it in GitHub Desktop.
Save milesgrimshaw/3712fd97e87e788f93d0 to your computer and use it in GitHub Desktop.
Custom style for map of personal data exhaust
#ubergeojson, #original {
line-color: @road;
line-width: 0.5;
[zoom>=11] { line-width: 0.5; }
[zoom>=12] { line-width: 0.7; }
[zoom>=13] { line-width: 1; }
[zoom>=14] { line-width: 1.2; }
[zoom>=15] { line-width: 1.4; }
[zoom>=16] { line-width: 1.6; }
}
// Languages: name (local), name_en, name_fr, name_es, name_de
@name: '[name_en]';
// Color palette //
@road: #fdfdfc;
@land: #d5d5d5;
@water: #5c7b7e;
@fill1: #fff;
@fill2: #bbb;
@fill3: #777;
@fill4: #000;
Map { background-color: @land; }
// Political boundaries //
#admin[admin_level=2][maritime=0] {
line-join: round;
line-color: mix(@fill3,@fill2,50);
line-width: 1;
[zoom>=5] { line-width: 1.4; }
[zoom>=6] { line-width: 1.8; }
[zoom>=8] { line-width: 2; }
[zoom>=10] { line-width: 3; }
[disputed=1] { line-dasharray: 4,4; }
}
#admin[admin_level>2][maritime=0] {
line-join: round;
line-color: @fill2;
line-width: 1;
line-dasharray: 3,2;
[zoom>=6] { line-width: 1.5; }
[zoom>=8] { line-width: 1.8; }
}
#building {
[zoom>=15] {polygon-fill: mix(@fill2,@land,25);}
[zoom>=16]{ polygon-fill: mix(@fill2,@land,50);}
}
#water {
::fill {
polygon-fill: @water;
}
}
#waterway {
[type='river'],
[type='canal'] {
line-color: @water;
line-width: 0.5;
[zoom>=12] { line-width: 1; }
[zoom>=14] { line-width: 2; }
[zoom>=16] { line-width: 3; }
}
[type='stream'] {
line-color: @water;
line-width: 0.5;
[zoom>=14] { line-width: 1; }
[zoom>=16] { line-width: 2; }
[zoom>=18] { line-width: 3; }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment