-
Notifications
You must be signed in to change notification settings - Fork 16
PB-1383: initial values not included in external layers #1509
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PB-1383: initial values not included in external layers #1509
Conversation
pakb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you broke a unit test, please fix it
8d8a697 to
6c7fe50
Compare
7c9e72d to
a1df253
Compare
7c4ddd7 to
a287cb9
Compare
| try { | ||
| layerOptions = optionsFromCapabilities(capabilities, {layer: attributes.id, projection: outputProjection.epsg}) | ||
| } catch (exception) { | ||
| const msg = `issue while getting the options from capabilities : ${exception?.toString()}` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need to create a variable as you are only using it once
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the optionsFromCapabilities can create exceptions (for example: when getAxisOrientation() returns null, which happened in some tests). Without the try catch, layers which are defined in the capabilities won't load, and won't be shown.
If the axisOrientation is a mandatory part of any wmts layer, then we can revert this change and fix our fixtures instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so, turns out the issue was linked to a lack of registration of the swiss projection. We can either keep a try catch around the options to have some more logging, or consider the existing logging is sufficient enough.
packages/viewer/src/store/plugins/storeSync/params/bgLayer.param.ts
Outdated
Show resolved
Hide resolved
a1cccff to
9e6d8d7
Compare
b7a7534 to
3228bdd
Compare
20fb715 to
ac5fdc4
Compare
Issue: When loading an external WMS layer, the initial values (like the visibility or opacity) were not passed to the layer, which meant that on startup, we would automatically lose their initial state. Fix: We add the initial values as parameters to the `makeExternalWMSLayer` function.
Issue: When starting the app for the first time, the URL sync plugin would start being active before the topics were fully set, causing (mainly) the background layer parameter to be ignored and replaced with the topic's default one Fix: The `ConfigLoaded` state now wait for the background layer to be set before being fulfilled.
small modifications to the loading of topics, there was a case where it would refuse to set up the default background on startup
…d crash and stops a layer from loading
- some more tests coverage corrections - removal of some useless comments - adding some comments to tell people why some changes have happened
- some more tests coverage corrections - removal of some useless comments - adding some comments to tell people why some changes have happened PB-1383: adding proj4 registration to layers so openlayers supports layers with only swiss projections - Issue with the drag and drop reordering test: when it was called alone, it would pass, when it would be called after the one reordering layers with the buttons, it would fail because a menu popup would show which was not planned. Rather than place a "force" which could pass even if the element is somehow obscured for a non legitimate reason, I switched the order of the tests - Issue with the call of layer capabilities: We've changed the number of expected calls in the tests, as the capabilities are called once per layer, not once in total. If we need to rework the capabilities handling, we'll have to change this test once again.
ac5fdc4 to
ecda228
Compare
Issue: When loading an external WMS layer, the initial values (like the visibility or opacity) were not passed to the layer, which meant that on startup, we would automatically lose their initial state.
Fix: We add the initial values as parameters to the
makeExternalWMSLayerfunction.Test link