Skip to content

Instantly share code, notes, and snippets.

@wboykinm
Last active December 10, 2015 07:58
Show Gist options
  • Save wboykinm/4404242 to your computer and use it in GitHub Desktop.
Save wboykinm/4404242 to your computer and use it in GitHub Desktop.
CartoCSS for 6 polygon classes w/ variables for tile_style
{tile_style: "#{{table_name}}{line-color:#222;line-width:1.2;polygon-opacity:0.9;[" + crop + "<0.5]{polygon-fill:#FFFFFF;}[" + crop + ">=0.5][" + crop + "<0.75]{polygon-fill:#BCB8FF;}[" + crop + ">=0.75][" + crop + "<1]{polygon-fill:#9991FF;}[" + crop + ">=1][" + crop + "<1.5]{polygon-fill:#5B4FFF;}[" + crop + ">=1.5][" + crop + "<2]{polygon-fill:#392BFF;}[" + crop + ">=2]{polygon-fill:#1300FF;}}"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment