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

Full implementation ColorCategoriesStyle #92

Closed alasarr closed 4 years ago

VictorVelarde commented 4 years ago

I made several 'small' comments, but overall, the main idea LGTM. (explicit source instantiation with metadata + source-dependant style functions).

Main points for discussion, with things I miss:

With probably a bit less of urgency / relevance now:

alasarr commented 4 years ago

I agree with the three comments @VictorVelarde. Let's do it, they're not hard right now and they will be hard in the future.

alasarr commented 4 years ago

What I don't agree is to adapt to CamelCase the fields of the API. I like the idea to keep them as they are at the API and it requires no extra effort 😄

alasarr commented 4 years ago

Completed the implementation of the 2/3 points.

If we extend the mechanism for the new 'style functions', that makes use of the Source, so they can allow a bigger object (Layer).

I've not done this, because if we do that we create a circular dependency between Layer and Styles. Maybe we could add a map parameter with the instance of the map instead of the layer. Thoughts?