Skip to content

Instantly share code, notes, and snippets.

@furilo
Created April 15, 2014 15:01
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 furilo/10739623 to your computer and use it in GitHub Desktop.
Save furilo/10739623 to your computer and use it in GitHub Desktop.
$('#colorpoly').bind('change', function(){
if($(this).is(':checked')){
// "color polygons" box was checked
layer.getSubLayer(0).setCartoCSS('#eez [zoom>=0]{ opacity: 0.7; }');
}
else {
layer.getSubLayer(0).setCartoCSS('#eez [zoom>=0]{ polygon-opacity: 0;}');
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment