Skip to content

PB-1685: duplicate COG layers from WMS can't be compared#1346

Merged
ltkum merged 1 commit intodevelopfrom
fix-PB-1685-compare-same-external-layer
May 19, 2025
Merged

PB-1685: duplicate COG layers from WMS can't be compared#1346
ltkum merged 1 commit intodevelopfrom
fix-PB-1685-compare-same-external-layer

Conversation

@ltkum
Copy link
Contributor

@ltkum ltkum commented May 16, 2025

  • Issue : When starting the application with the compare slider active, sometimes the rendering event would not be instantiated, meaning the compare slider would not work.
  • Reason: When instantiating the compare slider, we used to add a once trigger on precompose if there were no layers ready on the map, but there were layers in the store. precompose is only fired with vector layers (webGL context). This means that, in this case where we had WMS layers which used the canvas context, the event was never fired.
  • Fix: We use a rendercomplete event instead and ask for a new render.

Test link

@ltkum ltkum requested review from pakb and sommerfe May 16, 2025 13:57
@github-actions github-actions bot added the bug label May 16, 2025
@cypress
Copy link

cypress bot commented May 16, 2025

web-mapviewer    Run #5340

Run Properties:  status check passed Passed #5340  •  git commit 1809d2915c: PB-1685: duplicate COG layers from WMS can't be compared
Project web-mapviewer
Branch Review fix-PB-1685-compare-same-external-layer
Run status status check passed Passed #5340
Run duration 05m 29s
Commit git commit 1809d2915c: PB-1685: duplicate COG layers from WMS can't be compared
Committer Martin Künzi
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 20
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 251
View all changes introduced in this branch ↗︎

- Issue : When starting the application with the compare slider active, sometimes the rendering event would not be instantiated, meaning the compare slider would not work.
- Reason: When instantiating the compare slider, we used to add a once trigger on precompose if there were no layers ready on the map, but there were layers in the store. precompose is only fired with vector layers (webGL context). This means that, in this case where we had WMS layers which used the canvas context, the event was never fired.
- Fix: We use a rendercomplete event instead and ask for a new render.
@ltkum ltkum force-pushed the fix-PB-1685-compare-same-external-layer branch from 81146e9 to 1809d29 Compare May 19, 2025 06:23
@ltkum ltkum merged commit de35c99 into develop May 19, 2025
6 checks passed
@ltkum ltkum deleted the fix-PB-1685-compare-same-external-layer branch May 19, 2025 07:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants