Skip to content

Bug | Layers duplicating inside TimelineStack #7752

Description

@Sivloc

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 ?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions