Is there an easy way to set a different colour for each of an n number of polygons in a named template in CartoDB API?
If I'm currently creating my template this way, how could I go about having each polygon a different colour for instance by randomly generating hex codes?
{
"version": "0.0.1",
"name": "test",
"auth": {
"method": "open"
},
"layergroup": {
"layers": [{
"type": "cartodb",
"options": {
"cartocss_version": "2.1.1",
"cartocss": "#layer { polygon-fill: #FFF; }",
"sql": "select * from table"
}
}]
}
}
Aucun commentaire:
Enregistrer un commentaire