0

I have a table of polygons named 'testtable'. Within it is a column 'color', which has hex codes.

I want to style the polygons based on the hexcode values.. is this possible?

I was trying something like this, but it's obviously not working..

testtable{

polygon-fill: {color}; }

Thx,

  • This link is essentially the same thing I'm looking for... I fear it might not be implemented yet. link – AASIO Mar 23 '14 at 3:30
1

No, it doesn't work with the current system. Buuuut, there is a pretty complex workaround. Take a look at the CartoCSS attached lower down in this example,

http://bl.ocks.org/andrewxhill/5579335

Basically, it encodes a logical statement for 200+ named colors in my column to create a hex.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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