Created
May 13, 2013 19:07
-
-
Save sllvn/5570644 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Languages: name (local), name_en, name_fr, name_es, name_de | |
@name: '[name_en]'; | |
// Common Colors // | |
@water: #c3e6ff; | |
@park: #cec; | |
Map { | |
background-color:#fff; | |
} | |
// Political boundaries // | |
#admin { | |
line-join: round; | |
line-color: #bbe; | |
[maritime=1] { line-color: darken(@water, 3%); } | |
// Countries | |
[admin_level=2] { | |
line-width: 1.4; | |
[zoom>=6] { line-width: 2; } | |
[zoom>=8] { line-width: 4; } | |
[disputed=1] { line-dasharray: 4,4; } | |
} | |
// States / Provices / Subregions | |
[admin_level>=3] { | |
line-width: 0.4; | |
line-dasharray: 10,3,3,3; | |
[zoom>=6] { line-width: 1; } | |
[zoom>=8] { line-width: 2; } | |
[zoom>=12] { line-width: 3; } | |
} | |
} | |
// Places // | |
#country_label[zoom>=3] { | |
text-name: @name; | |
text-face-name: 'Source Sans Pro Bold'; | |
text-wrap-width: 100; | |
text-wrap-before: true; | |
text-fill: #66a; | |
text-size: 12; | |
[zoom>=3][scalerank=1], | |
[zoom>=4][scalerank=2], | |
[zoom>=5][scalerank=3], | |
[zoom>=6][scalerank>3] { | |
text-size: 14; | |
} | |
[zoom>=4][scalerank=1], | |
[zoom>=5][scalerank=2], | |
[zoom>=6][scalerank=3], | |
[zoom>=7][scalerank>3] { | |
text-size: 16; | |
} | |
} | |
#country_label_line { | |
line-color: #324; | |
line-opacity: 0.05; | |
} | |
#place_label { | |
[type='city'][zoom<=15] { | |
text-name: @name; | |
text-face-name: 'Source Sans Pro Semibold'; | |
text-fill: #444; | |
text-size: 16; | |
text-wrap-width: 100; | |
text-wrap-before: true; | |
[zoom>=10] { text-size: 18; } | |
[zoom>=12] { text-size: 24; } | |
} | |
[type='town'][zoom<=17] { | |
text-name: @name; | |
text-face-name: 'Source Sans Pro Regular'; | |
text-fill: #333; | |
text-size: 14; | |
text-wrap-width: 100; | |
text-wrap-before: true; | |
[zoom>=10] { text-size: 16; } | |
[zoom>=12] { text-size: 20; } | |
} | |
[type='village'] { | |
text-name: @name; | |
text-face-name: 'Source Sans Pro Regular'; | |
text-fill: #444; | |
text-size: 12; | |
text-wrap-width: 100; | |
text-wrap-before: true; | |
[zoom>=12] { text-size: 14; } | |
[zoom>=14] { text-size: 18; } | |
} | |
[type='hamlet'], | |
[type='suburb'] { | |
text-name: @name; | |
text-face-name: 'Source Sans Pro Regular'; | |
text-fill: #666; | |
text-size: 12; | |
text-wrap-width: 100; | |
text-wrap-before: true; | |
[zoom>=14] { text-size: 14; } | |
[zoom>=16] { text-size: 16; } | |
} | |
} | |
// Water Features // | |
#water { | |
polygon-fill: @water; | |
polygon-gamma: 0.6; | |
} | |
#water_label { | |
[zoom<=13], // automatic area filtering @ low zooms | |
[zoom>=14][area>500000], | |
[zoom>=16][area>10000], | |
[zoom>=17] { | |
text-name: @name; | |
text-face-name: 'Source Sans Pro Italic'; | |
text-fill: darken(@water, 30%); | |
text-size: 13; | |
text-wrap-width: 100; | |
text-wrap-before: true; | |
} | |
} | |
#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; } | |
} | |
} | |
// Landuse areas // | |
#landuse { | |
[class='park'] { polygon-fill: @park; } | |
} | |
#area_label { | |
[class='park'] { | |
[zoom<=13], // automatic area filtering @ low zooms | |
[zoom>=14][area>500000], | |
[zoom>=16][area>10000], | |
[zoom>=17] { | |
text-name: @name; | |
text-face-name: 'Source Sans Pro Italic'; | |
text-fill: darken(@park, 50%); | |
text-size: 13; | |
text-wrap-width: 100; | |
text-wrap-before: true; | |
} | |
} | |
} | |
// Buildings // | |
#building { | |
polygon-fill: #f9f0e3; | |
} | |
// Roads & Railways // | |
#tunnel { opacity: 0.5; } | |
#road, | |
#tunnel, | |
#bridge { | |
['mapnik::geometry_type'=2] { | |
line-color: #cde; | |
line-width: 0.5; | |
[class='motorway'], | |
[class='main'] { | |
[zoom>=10] { line-width: 1; } | |
[zoom>=12] { line-width: 2; } | |
[zoom>=14] { line-width: 3; } | |
[zoom>=16] { line-width: 5; } | |
} | |
[class='street'], | |
[class='street_limited'] { | |
[zoom>=14] { line-width: 1; } | |
[zoom>=16] { line-width: 2; } | |
} | |
[class='street_limited'] { line-dasharray: 4,1; } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment