Skip to content

Draft: Resolve "Incorrect initial render for map on dashboard navigation"

How to reproduce

  1. Load a dashboard that has map with observation data (time range as default)
  2. Click to other dashboard from sidebar
  3. Navigate back to the dashboard with map using sidebar

What happens

The map is empty

What should happen

The map should show the same observation data as before

Solution

The useEffect hook in this code is used to set the animation delay for a web map whenever the animationSpeed prop changes. There is unnecessary triggering to this useEffect, which causes the map disappearing.

The solution is set animationSpeed changes only when it really changes inside useEffect.

Looks like this not fixed the problem. This bug is depending somehow time and works as expected in some situations and works not in some others.

Closes #658 (closed)

Edited by Ari Myllymäki

Merge request reports