StackedMaps expand?

Hello community!

I am working with mapView.StackedMaps. I have added a slider for dynamically changing the distance between the rows, however once mapView.StackedMaps.expand({}) is set, it is not possible to call it again and change the distance between the floors. I have to call mapView.StackedMaps.collapse() and after then mapView.StackedMaps.expand({}) with the updated value and after then the distance is changed, however for some reason, first it collapses the floors and then again you should change the value and after taht it expands it and then again if you want to update it, you should change the value of the slider twice, otherwise it will collapse.
Do you know what is the clean way to solve this issue?

Thank you in advance!

The Stacked Maps API has actually been re-designed in the production release of v6 Mappedin JS and allows you to do this. Have a look at our updated Stacked Maps Guide for sample code and an example that does exactly what you describe using updateState().

Thank you for the help