Skip to main content
6 votes
Accepted

Replacing legend item names in Carto VL

You could create an Object before layer.on('loaded'... with the legend keys you want to use for this dataset, for example: const LEGEND_KEYS = { LT: 'Least Threatened', VU: '...
Elena Torró's user avatar
4 votes
Accepted

How to reverse quantile color palette with CARTO VL

Yes, it is possible by using the reverse expression. Using the code from your example, it would be: color: ramp(globalQuantiles($sa_m3_km2, 10), reverse(temps)) You can find more about this ...
Elena Torró's user avatar
4 votes
Accepted

Updating legend (when active layer is changed) in CARTO VL?

Exactly! The 'loaded' event is only fired when the layer is loaded, but the 'updated' event is fired every time the layer is updated. You can take a look at this example: https://carto.com/developers/...
Elena Torró's user avatar
3 votes
Accepted

SQL layer wont ORDER BY in CARTO VL

I think the problem here is that you're passing directly the attribute ($yield_ls) to the ramp expression, and the results are sorted by number of occurrences of each category. In order to classify ...
Elena Torró's user avatar
3 votes
Accepted

Auto Style in Carto Airship

Are you using the VL Bridge? If so, there is an undocumented method for the category widget's bridge: enableColorMapping. If the viz bridged to your as-category-widget has a color ramp, it will add ...
Román's user avatar
  • 126
3 votes

How to run basic setup CARTO VL?

You're probably making no mistake, Kristen. If you copy & paste exactly the last piece of code from that guide (with the whole html code), there is a relative link to style.css, which you have ...
Víctor Velarde's user avatar
3 votes

How do you create buffers around points based on individual point values in CARTO?

To create different individual drive time buffers you can't use BUILDER, as it's not parametrized by a field. Instead, you need to use SQL directly to UPDATE your dataset with the geometries. So if ...
Jorge Sanz's user avatar
  • 2,625
2 votes
Accepted

CARTO Airship widget default text

There is a non documented property for this. In the histogram is called noDataHeaderMessage https://github.com/CartoDB/airship/blob/master/packages/components/src/components/as-histogram-widget/as-...
iagolast's user avatar
2 votes
Accepted

Where to find datasets for creating CARTO VL maps?

The data in the demos is probably specifically processed, but it is not difficult find these open datasets from 'the Internet'. For example, they are in Google BigQuery open datasets, and e.g. https://...
JaakL's user avatar
  • 2,156
2 votes
Accepted

Using CARTO VL on local Ubuntu installation

Assumming the account in your local installatioin is named me, you can try to define your source like this, which I hope works for you: const source = new carto.source.Dataset( 'compact_regions', { ...
jgoizueta's user avatar
2 votes
Accepted

How to know when a widget from CARTO Airship is loaded

You can change the properties of the widget right after the append call. For instance, you could change visibleCategories and it should work. If you need to read the properties back, you have to wait ...
Román's user avatar
  • 126
2 votes
Accepted

Animation does not work GeoJSON date fields in CARTO VL

The GeoJSON source method has an option to indicate the 'date' columns. Can you try with something like this? const dateColumns = ['date']; const options = { dateColumns }; const newSource = new ...
Víctor Velarde's user avatar
1 vote
Accepted

Compositing Operations in CARTO VL

Unfortunately, there is no way to generate composing operations in CARTO VL.
ramiroaznar's user avatar
  • 4,449
1 vote
Accepted

Carto Bubble-legend class

As far as I know, CARTO VL has never released an out of the box bubble legend. The proper way to get the width ranges from your buckets using the getLegendData method: layer.on("loaded", () =...
ramiroaznar's user avatar
  • 4,449
1 vote

Size Legend for Carto VL

You are mixing the viz declaration with the getLegendData method to retrieve the metadata of your visualization. So first declare your width property: const viz = new carto.Viz(` width: ...
ramiroaznar's user avatar
  • 4,449
1 vote
Accepted

Interactive progress bar in CartoVL

Here you have an example from CARTO-VL's documentation on animation controls: Interactive progress bar in CartoVL. Basically, what you need to do is to use setCurrent method to update the animation ...
jesusbotella's user avatar
1 vote
Accepted

WebGL error when switching visualization

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 ...
ramiroaznar's user avatar
  • 4,449
1 vote
Accepted

CARTO VL time steps not working

There're several issues here: Your GeoJSON doesn't include the feature geometry. It should have the geometry type and the coordinates: "geometry": { "type": "Point", "coordinates": [ 30, 10 ]...
Elena Torró's user avatar
1 vote

Using carto-vl to connect to local installation

Make sure you're changing not only the default config with setDefaultConfig, but also the default auth settings with setDefaultAuth correctly: carto.setDefaultAuth({ username: 'dev', apiKey: '...
Elena Torró's user avatar
1 vote
Accepted

Can I use external map data with cartojs library?

There's nothing that prevents you to add more layers to your Leaflet or Google Maps map aside from CARTO.js layers, same for Mapbox GL on CARTO VL. If you are referring to use CARTO.js methods then ...
Jorge Sanz's user avatar
  • 2,625
1 vote

Updating legend (when active layer is changed) in CARTO VL?

The solution is to change the trigger legend event from 'loaded' to 'updated': aquiferLayer.on('updated', () => {})
JohnGIS's user avatar
  • 515
1 vote

How do you create buffers around points based on individual point values in CARTO?

In CARTO, you can style points as buffers based on individual column values (such as average of commuting time) using both CartoCSS (used in Builder and CARTO.js) and CARTO VL. If you are using ...
ramiroaznar's user avatar
  • 4,449
1 vote

How do you create buffers around points based on individual point values in CARTO?

CARTO's Create Travel or Distance Buffers tutorial provides a guide which describes how to apply a buffer as follows: Import the template .carto file packaged from “Download resources” of this ...
whyzar's user avatar
  • 12.1k
1 vote

How to use CARTO map visualization in Odyssey.js sandbox

Unfortunately, the new version of Builder visualizations are not compatible with Odyssey.js. But as explained in this CARTO HELP article, you can use CARTO.js (and CARTO VL!) in combination with other ...
ramiroaznar's user avatar
  • 4,449
1 vote

Adding labels to a Carto VL visualization?

With the new CARTO VL v1.1 we have just released, we added a new method to features called getRenderedCentroid. That allows creating a dynamic geojson layer, which then can be used to apply the common ...
Víctor Velarde's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible