Fix printing WMTS background layers loaded at startup (#7705)#7706
Fix printing WMTS background layers loaded at startup (#7705)#7706offtherailz merged 5 commits intogeosolutions-it:masterfrom
Conversation
|
fwiw, even if eslint chokes on my style (and the error makes no sense to me): i've tested the resulting war locally built by backporting those 3 commits to ms2-geor, and that fixes the two distinct WMTS printing issues i was seeing. There are probably more here and there, but from my side that's already an improvement. |
|
@landryb thank you for your contribution. A reviewer has been assigned, we will review this PR as soon as possible. I've just noticed few failing tests that maybe you want to check in the meantime. |
fwiw that's what i had put in my previous comment, i have no idea why eslint chokes on this else. Or maybe the else should just be dropped completely, but those coding rules feel a bit strange. |
|
This is the detail of the rule: https://eslint.org/docs/rules/no-else-return If the "if" blocks contains a return, the else is an unnecessary block. Example: if (condition) {
return x;
} else {
// do y
}
return z;is the same of if (condition) {
return x;
}
// do y
return z;So the else is unnecessary and it may complicate the code reading. |
offtherailz
left a comment
There was a problem hiding this comment.
Thank you very much for contributing.
I tested with the WMTS services you provided and it works. I don't see any problem applying this changes.
I added a unit test for you. Let's wait the checks to merge
|
@ElenaGallo, could you please test this on DEV ? Thank you You can test you can now print layers from these two WMTS services |
|
Test passed, @offtherailz please backport to stable branch. |
|
thanks @offtherailz for the merge ! to fully test the default value for tiles & wmts.craig.fr are aliases for our mapproxy service. |
|
Thank you @landryb for the hint, i improved my test description and verified that it worked |
…2#7706 and geosolutions-it/MapStore2#7811" This reverts commit 03116da.
default requestEncoding to KVP
Description
try fixing some of the issues printing WMTS layers
Please check if the PR fulfills these requirements
What kind of change does this PR introduce? (check one with "x", remove the others)
Issue
What is the current behavior?
#7705
What is the new behavior?
printing a WMTS background layer loaded at startup works
Breaking change
Does this PR introduce a breaking change? (check one with "x", remove the other)
Other useful information
note that this is only part of the fix, it doesnt fix printing WMTS layers coming from non-geoserver services such as mapproxy, for which
getDefaultStyleIdentifierreturns null.