hslayers / hslayers-ng

User interface and map building extensions for OpenLayers
https://ng.hslayers.org/
MIT License
37 stars 20 forks source link

Duplicated sidebar entries when navigating (changing routes) #4336

Closed joaorodr84 closed 1 year ago

joaorodr84 commented 1 year ago

Bug

Describe the bug When using angular/router ang changing routes, the sidebar entries get duplicated/triplicated/etc. It seems that the Observable of buttons never clears up and each time my map is reloaded, the previous sidebar entries are kept and a new batch is loaded on top of them

To Reproduce Steps to reproduce the behavior:

  1. Configure angular routes and put the hslayers map in one of those routes (e.g. /map)
  2. Navigate back and forth from /map do one of the other routes.
  3. Sidebar entries are never cleared and are loaded on top of each other.

Expected behavior The sidebar entries should remain the same.

Screenshots 2023-09-14_15h44_36 go to /home 2023-09-14_15h48_02 go to /map 2023-09-14_15h48_11

Additional context I uploaded my code here and a video of this behaviour here

jmacura commented 1 year ago

Thanks for reporting the issue @joaorodr84 ! We have identified the problem and the fix is on the way in #4340 . It will be OK in release 12.1.