Skip to content

Instantly share code, notes, and snippets.

@yosemitebandit
Created May 2, 2012 00:28
Show Gist options
  • Save yosemitebandit/2572606 to your computer and use it in GitHub Desktop.
Save yosemitebandit/2572606 to your computer and use it in GitHub Desktop.
labeling organizations in carto via a CSV
Map {
background-color: #b8dee6;
}
#10madmin0countries {
line-color:#594;
line-width:0.5;
polygon-opacity:1;
polygon-fill:#ae8;
}
@text-label-color: #323232;
@fill-color: #FFFBC2;
#10madmin0countries[NAME="Ecuador"]
, #10madmin0countries[NAME="Bolivia"]
, #10madmin0countries[NAME="Morocco"]
, #10madmin0countries[NAME="Ghana"]
, #10madmin0countries[NAME="Congo (Kinshasa)"]
, #10madmin0countries[NAME="South Africa"]
, #10madmin0countries[NAME="Mozambique"]
, #10madmin0countries[NAME="Kenya"]
, #10madmin0countries[NAME="Somaliland"]
, #10madmin0countries[NAME="India"]
, #10madmin0countries[NAME="Sri Lanka"]
, #10madmin0countries[NAME="Bangladesh"]
, #10madmin0countries[NAME="Vietnam"]
, #10madmin0countries[NAME="Cambodia"] {
::polygon {
polygon-fill: @fill-color;
}
::line {
line-color: darken(@fill-color, 40%);
line-width: 0.5;
}
}
#aquatest-partners {
::labels {
text-name: "[organization]";
text-face-name: "Kalinga Regular";
text-allow-overlap: true;
text-wrap-width: 100;
text-line-spacing: 1;
text-fill: @text-label-color;
text-halo-fill: desaturate(@fill-color, 20%);
text-halo-radius: 1;
text-size: 12;
}
}
#aquatest-partners[country="Ecuador"] {
::labels {
text-dx: -10;
text-dy: -1;
}
}
#aquatest-partners[country="Bolivia"] {
::labels {
text-dx: -10;
text-dy: 0;
}
}
#aquatest-partners[country="Morocco"] {
::labels {
text-dx: -10;
text-dy: 0;
}
}
#aquatest-partners[country="Ghana"] {
::labels {
text-dx: -1;
text-dy: 5;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment