CartoDB/airship

Add animation helper to be used with the styles

elenatorro opened this issue · 0 comments

Problem
When animating a visualization in a style helper by using the animated parameter, we lose control of the animation and we can't set the following settings:

  • duration
  • fade
  • hold

Proposed solution
Add an animation helper

from cartoframes.viz import Map, Layer, color_continuous_style, animation_settings

Map(
    Layer(
        'table_name',
        color_continuous_style('column_name'),
        animated=animation_settings('animated_column_name', fade_in=1, fade_out='hold')
    )
)

This can be combined with the current animated parameter, or leave the animated parameter as it is right now and add a new animation parameter instead

Map(
    Layer(
        'table_name',
        color_continuous_style('column_name'),
        animation=animation_settings('animated_column_name', fade_in=1, fade_out='hold'),
        animated=True
    )
)