1

Within CartoDB my CartoCSS looks something like

#table_copy_1 [ lease_rate <= 55.15] {
   marker-width: 35.0; marker-fill: #081B47     
}

Can I add another variable (size) so that the display filters by both lease_rate and size? My idea is that it would look like this:

#table_copy_1 [ lease_rate <= 55.15, size <= 40000] {
   marker-width: 35.0; marker-fill: #081B47     
}

1 Answer 1

2

Yes, combining multiple filters is allowed. For example:

#cities {
  [zoom>=4][population>1000000],
  [zoom>=5][population>500000],
  [zoom>=6][population>100000] {
    text-name: [name];
    text-face-name: 'Arial Regular';
  }
}

from https://www.mapbox.com/tilemill/docs/guides/selectors/ (found by googling cartocss tutorial multiple conditions)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.