angulargoogle-maps-api-3cartodb

Is there any way to change layer's style based sql query (carto.js v4)?


I'm showing a layer over a google map and I wanna change layer's style.

I have a select control that contains dataset's columns, so when the user selects an option I'm getting to carto the unique values column.

So these values I wanna take and assign them a color and apply it to the layer.

Here is a sample that I want to.

enter image description here


Solution

  • It looks you are looking for the setContent method for your Style. You have an example of editing CartoCSS here and also here.