Skip to content

Instantly share code, notes, and snippets.

@wboykinm
Created March 28, 2013 20:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wboykinm/5266467 to your computer and use it in GitHub Desktop.
Save wboykinm/5266467 to your computer and use it in GitHub Desktop.
A muddled starting place . . .
pb1: function(){
//layers[0].setQuery("SELECT * FROM {{table_name}}");
layers[0].setCartoCSS("#{{table_name}}{[zoom<=8]{line-width:0;}[zoom>8][zoom<=11]{line-width:0.4;}[zoom>11][zoom<=13]{line-width:1.2;}[zoom>13]{line-width:1.6;}line-color:#3B007F;line-opacity:0.8;polygon-opacity:0.8;[pb1<=3]{polygon-fill:#fff7fb;}[pb1>3][pb1<=6]{polygon-fill:#ece7f2;}[pb1>6][pb1<=10]{polygon-fill:#d0d1e6;}[pb1>10][pb1<=12]{polygon-fill:#a6bddb;}[pb1>12][pb1<=15]{polygon-fill:#74a9cf;}[pb1>15][pb1<=20]{polygon-fill:#3690c0;}[pb1>20][pb1<=30]{polygon-fill:#0570b0;}[pb1>30]{polygon-fill:#034e7b;}}#{{table_name}}::labels{[zoom>10]{text-name:[ea1];text-face-name:'DejaVu Sans Book';text-fill:#FFFFFF;text-allow-overlap:true;text-halo-fill: #3b007f;text-halo-radius:1.6;text-size:14;}}");
return true;
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment