I am getting similar WebGL error messages when switching CARTO VL visualizations:

[.WebGL-0x59c22054800]RENDER WARNING: there is no texture bound to the unit 0
[.WebGL-0x59c222e5500]RENDER WARNING: there is no texture bound to the unit 1

These errors are being returned when switching from a current visualization to a new created one as shown in this example, but also when blending the visualization with a new filter as in this other example.

I have seen the last option working fine in this block. What is wrong with my examples code?

UPDATE: it looks like the problem is related to the (GeoJSON) data source. Replicating the same examples but using Dataset or SQL works (viz, filter examples).


It looks like it is a bug in CARTO VL library as reported in this GitHub issue. Basically, when your data source is a GeoJSON, it fails when you want to update the color or filter by any property that was missing in the first viz.

Until they fix this, a workaround would be adding the property to the first (and second if you want to toggle) viz.

A. In order to filter by a property that is missing in your first viz, add a variable like this:

const vizCountries = new carto.Viz(`
  @country: $country

Then you will be able to use the viz.filter.blendTo("$country in ['France']").

B. You could do the same when updating the colors or the whole viz:

const viz = new carto.Viz(`
  color: ramp($population, sunset)
  @country: $country

Then you will be able to use the viz.color.blendTo("ramp($country, bold)" or layer.blendVizTo if you have created a second viz instance.

Both of my examples are not working.

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.