Skip to content

Instantly share code, notes, and snippets.

@andrewxhill
Created December 9, 2011 19:48
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save andrewxhill/1452995 to your computer and use it in GitHub Desktop.
Save andrewxhill/1452995 to your computer and use it in GitHub Desktop.
Clustering stylings for CartoDB
#points_na{
marker-fill:#FF6600;
marker-opacity:0;
marker-width:35;
marker-line-color:white;
marker-line-width:3;
marker-line-opacity:0;
marker-placement:point;
marker-type:ellipse;
marker-allow-overlap:true;
[cnt<30]{
marker-width:30;
}
[cnt<25]{
marker-width:25;
}
[cnt<20]{
marker-width:20;
}
[cnt<15]{
marker-width:15;
}
[cnt<10]{
marker-width:10;
}
[cnt<5]{
marker-width:7;
}
[cnt<2]{
marker-width:5;
}
}
#points_na[zoom>7]{
[level=4]{
marker-opacity:0.7;
marker-line-opacity:0.9;
}
}
#points_na[zoom<8]{
[level>3]{
marker-opacity:0;
marker-line-opacity:0;
}
[level=3]{
marker-opacity:0.7;
marker-line-opacity:0.9;
}
}
#points_na[zoom<6]{
[level>2]{
marker-opacity:0;
marker-line-opacity:0;
}
[level=2]{
marker-opacity:0.7;
marker-line-opacity:0.9;
}
}
#points_na[zoom<4]{
[level>1]{
marker-opacity:0;
marker-line-opacity:0;
}
[level=1]{
marker-opacity:0.7;
marker-line-opacity:0.9;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment