OpenGeoscience / uvdat

UVDAT Urban Visualization and Data Analysis Toolkit
Apache License 2.0
1 stars 1 forks source link

Fix Active Layers behavior #32

Closed jjnesbitt closed 11 months ago

jjnesbitt commented 11 months ago

Fixes #31 This PR also fixes the behavior in the raster slider / number input.

The underlying issue that was causing #31 to occur was the fact that we were deleting and re-adding a layer to the map, for two different use cases at the same time:

  1. If we change any styling of a raster (because the style params are encoded in the layer source URL)
  2. If we enable/disable the network vis mode of a network dataset (since they exist as two separate layers)

Since we heavily rely on consistent layer IDs, and removing/adding a layer to a map changes the layer ID, this was causing some weird behavior. This PR changes the behavior to directly handle raster styling changes, as well as node network visualization toggling.