CartoDB / airship

A design library for building Location Intelligence applications.
https://carto.com/developers/airship/
BSD 3-Clause "New" or "Revised" License
75 stars 14 forks source link

Integration guide with CARTO VL is wrong #575

Closed elenatorro closed 5 years ago

elenatorro commented 5 years ago

What is happening?

There's an issue with this example.

What should happen?

Last example, instead of:

function updateWidgets() {
$categoryWidget.categories = viz.variables.cities.value
    .map(feature => ({
         name: feature.name,
         value: feature.pop_max,
      }))
      .sort((a, b) => b.value - a.value);
 };

It should be

function updateWidgets() {
$categoryWidget.categories = viz.variables.cities.value
    .map(feature => ({
         name: feature.properties.name,
         value: feature.properties.pop_max,
      }))
      .sort((a, b) => b.value - a.value);
 };
VictorVelarde commented 5 years ago

Good catch @elenatorro. This was a change in VL API we made in v0.10, grouping the properties, that wasn't synchronized. I would add this example to the 'VL checklist for new releases'