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: '...
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 ...
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/...
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 ...
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 ...
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 ...
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 ...
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-...
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://...
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', {
...
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 ...
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 ...
1
vote
Accepted
Compositing Operations in CARTO VL
Unfortunately, there is no way to generate composing operations in CARTO VL.
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", () =...
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: ...
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 ...
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 ...
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 ]...
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: '...
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 ...
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', () => {})
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 ...
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 ...
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 ...
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 ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
carto-vl × 31carto × 30
javascript × 12
airship × 5
carto-js × 3
cartocss × 2
authentication × 2
python × 1
postgresql × 1
geojson × 1
labeling × 1
layers × 1
data × 1
web-mapping × 1
legend × 1
spatial-database × 1
html × 1
basemap × 1
time-series × 1
animation × 1
css × 1
search × 1
origin-destination × 1
progress × 1
odyssey-js × 1