CartoDB / toolkit

JS library to interact with CARTO APIs in a simple way
https://toolkit-wheat.now.sh
BSD 3-Clause "New" or "Revised" License
9 stars 3 forks source link

Style helpers improvements #115

Closed simon-contreras-deel closed 4 years ago

simon-contreras-deel commented 4 years ago

Plan

By helper and geometry type review:

vercel[bot] commented 4 years ago

This pull request is being automatically deployed with Vercel (learn more). To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/carto-frontend/toolkit/fpc6ebdb5 ✅ Preview: https://toolkit-git-helpers-use-size-in-pixels.carto-frontend.now.sh

VictorVelarde commented 4 years ago

Acceptance checklist

VictorVelarde commented 4 years ago

Nice work on this. Debug examples you have prepared are being really useful for validation.

I made a first review of all the debug examples, and everything looks fine except the size helpers. I still see 'jumps' and wrong pixel sizes (sizeBins, sizeCategories and sizeContinuous). Logic for adjusting based on viewport is not yet working fine

The rest of tests I made look fine: default palettes, override style options...

simon-contreras-deel commented 4 years ago

I still see 'jumps'

In the basic helper, as all the points have the same size, I changed it to use pointRadiusMinPixels and pointRadiusMaxPixels with the same value: the expected point size. That way, size does not change over zoom (it can not change)

I tried to follow a smilar idea with this cases, but it is not possible. All the stuff we can to to force size, it does not depends on features, but are general to the layer. The only way I can see is to change deck.gl to support pixels width in points.

wrong pixel sizes

I am checking it.

VictorVelarde commented 4 years ago

As we said, let's focus on wrong side (a-must), and forget a bit about 'jumps' (nice-to-have).

simon-contreras-deel commented 4 years ago

After playing with the @jesusbotella deck example, I see the pointRadiusScale does not affect to pointRadiusMinPixels and pointRadiusMinPixels. So:

I a going to follow the second one if possible.

alasarr commented 4 years ago

Needs to fix conflicts after merge interactivity