Skip to content

Instantly share code, notes, and snippets.

@andrewxhill
Created January 31, 2012 16:49
Show Gist options
  • Save andrewxhill/1711534 to your computer and use it in GitHub Desktop.
Save andrewxhill/1711534 to your computer and use it in GitHub Desktop.
combining styles across layers
http://wri-01.cartodb.com/tiles/rivers/7/43/66.png?sql=select 1 as lid, the_geom_webmercator from rivers UNION select 2 as lid, the_geom_webmercator from country_attributes_live where iso = 'BRA' &map_key=&style=
@adm1_line_color:#FFF;
@adm1_line_glowColor:#000;
#rivers {
[lid=1] {
[zoom<=6]{
line-width:0;
}
[zoom>=8]{
line-width:2;
}
line-color:#168;
line-opacity:0.4;
}
[lid=2] {
line-color: @adm1_line_color;
[zoom<=4]{
line-opacity: 1;
line-width:0.5;
line-dasharray:2,5;
}
[zoom<6]{
line-opacity: 1;
line-width:1;
line-dasharray:4,5;
}
[zoom>=6]{
line-opacity: 1;
line-width:2;
}
polygon-opacity:1;
polygon-fill: transparent;
::glow{
line-color:@adm1_line_glowColor;
line-opacity:0.1;
line-width:4;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment