When my terria instance loads, i'm iterating through catalogItems to add them to the workbench using terria.workbench.add(item).
Then, if they are a wmst layer, i'm linking them to the timeline using terriaµ.timelineStack.addToTop(item).
In the majority of cases, it works perfectly fine. But in of my use cases, i'm adding two wms items to the map, workbench AND timeline, but only the second one is actually linked to the timeline when i try to change the selected date.
At first i thought it was because they had the same "layer" attribute (despite requesting different urls) , but after modifying that, the issue sill persisted.
When i try and log the timeline, it appears that the first layer is added normally, then when the second layer is about to get added inside timelineStack, it both adds itself and replaces the first layer, logging a timelineStack with ["itemId2", "itemId2"] (which is weird, since addToTop() should prevent that if i understood correctly)
In any case, the layers are behaving correctly in all other aspects.
Is the issue on my side ?
Did i miss something ?
When my terria instance loads, i'm iterating through catalogItems to add them to the workbench using terria.workbench.add(item).
Then, if they are a wmst layer, i'm linking them to the timeline using terriaµ.timelineStack.addToTop(item).
In the majority of cases, it works perfectly fine. But in of my use cases, i'm adding two wms items to the map, workbench AND timeline, but only the second one is actually linked to the timeline when i try to change the selected date.
At first i thought it was because they had the same "layer" attribute (despite requesting different urls) , but after modifying that, the issue sill persisted.
When i try and log the timeline, it appears that the first layer is added normally, then when the second layer is about to get added inside timelineStack, it both adds itself and replaces the first layer, logging a timelineStack with ["itemId2", "itemId2"] (which is weird, since addToTop() should prevent that if i understood correctly)
In any case, the layers are behaving correctly in all other aspects.
Is the issue on my side ?
Did i miss something ?