Problem
There is another bug when unselecting a path if the currently displayed time has changed since the user selects the path.
Cause
To indicate whether a path is being selected or unselected on the Mapbox map, the code must set:
id: numerical id of the individual feature that is being selected/unselected (ie. path)
source: id of the source the individual feature belongs to (eg. this is time-dependent in the code)
Previously, a feature was added to allow a selected path to remain selected even when the user changes the currently displayed time. The change involves updating the source id, which is the time-dependent part of the data.
However, an earlier refactor updates the source id to the wrong field.
Problem There is another bug when unselecting a path if the currently displayed time has changed since the user selects the path.
Cause To indicate whether a path is being selected or unselected on the Mapbox map, the code must set:
Previously, a feature was added to allow a selected path to remain selected even when the user changes the currently displayed time. The change involves updating the source id, which is the time-dependent part of the data.
However, an earlier refactor updates the source id to the wrong field.
Fix Ensure the source id is updated properly