Created
July 4, 2013 16:50
-
-
Save wboykinm/5929062 to your computer and use it in GitHub Desktop.
fiddling tm2 colors
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: #494184; | |
@park: #fb682e; | |
Map { | |
background-color:#fb682e; | |
} | |
// Political boundaries // | |
#admin { | |
line-join: round; | |
line-color: #2d241b; | |
[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: #2d241b; | |
text-size: 12; | |
text-halo-fill:#e6dd98; | |
text-halo-radius:1.2; | |
[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: #b7b139; | |
line-opacity: 0.05; | |
} | |
#place_label { | |
[type='city'][zoom<=15] { | |
text-name: @name; | |
text-face-name: 'Source Sans Pro Semibold'; | |
text-fill: #2d241b; | |
text-size: 16; | |
text-wrap-width: 100; | |
text-wrap-before: true; | |
text-halo-fill:#e6dd98; | |
text-halo-radius:1.2; | |
[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: #2d241b; | |
text-size: 14; | |
text-wrap-width: 100; | |
text-wrap-before: true; | |
text-halo-fill:#e6dd98; | |
text-halo-radius:1.2; | |
[zoom>=10] { text-size: 16; } | |
[zoom>=12] { text-size: 20; } | |
} | |
[type='village'] { | |
text-name: @name; | |
text-face-name: 'Source Sans Pro Regular'; | |
text-fill: #2d241b; | |
text-size: 12; | |
text-wrap-width: 100; | |
text-wrap-before: true; | |
text-halo-fill:#e6dd98; | |
text-halo-radius:1.2; | |
[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: #2d241b; | |
text-size: 12; | |
text-wrap-width: 100; | |
text-wrap-before: true; | |
text-halo-fill:#e6dd98; | |
text-halo-radius:1.2; | |
[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: lighten(@water, 50%); | |
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: lighten(@park, 50%); | |
text-size: 13; | |
text-wrap-width: 100; | |
text-wrap-before: true; | |
} | |
} | |
} | |
// Buildings // | |
#building { | |
polygon-fill: #f8af42; | |
} | |
// Roads & Railways // | |
#tunnel { opacity: 0.5; } | |
#road, | |
#tunnel, | |
#bridge { | |
['mapnik::geometry_type'=2] { | |
line-color: #ffff00; | |
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