-
-
Notifications
You must be signed in to change notification settings - Fork 145
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
[Feature] Load layers as single WMS layer #3947
Conversation
Test notes:Waiting for Lizmap plugin "single layer" option development, you can switch from a mode to another by adding the attached js file as custom js in media folder. For now, I've only added a test project e2e Known failure on e2e tests when single Layer mode is turned on:
UPDATEThese test notes are now outdated since the singleWMS configuration is loaded from project config |
I would use Side idea: I think we should remove the active base layer (and obviously the externally requested WMS layers such as TMS) from the "single" image request. This would avoid having an empty map when zooming or panning (the base layer would come independently) |
@mdouchin , |
77114f8
to
655893f
Compare
e7f4956
to
294da5a
Compare
81b7dfd
to
106c208
Compare
bee85d3
to
18ff742
Compare
a1d0804
to
ee68aaf
Compare
c5d2f34
to
a1a315d
Compare
a1a315d
to
15c0884
Compare
Hi @mdouchin!
Right, I didn't consider that option. In this case excluding it means that the layer will go on top. |
I think, if |
This is not done for now on the plugin side. |
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.
From the UX point of view
Can you make a ticket in plugin ? @nboisteault Is this PR OK for you ? |
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.
@mind84 Many thanks for this work. There is just those messages in the console to look at please:
simplescreenrecorder-2024-03-19_14.17.10.mp4
Yep, thanks, I'll fix it |
15c0884
to
b5b4e89
Compare
Allows to load project layers as single WMS Layer.
Feature description:
This development is intended to increase LZM performance when large projects containing many layers are loaded.
This option is presented as alternative to classic mode, and users should be able to switch from one mode to another by acting on the Lizmap plugin configuration.
Despite the performance improvements, some functionality are no longer available when a single layer is loaded, i.e.:
Logics in detail
General
I used the same classic layer map instance for loading the single WMS image. The advantage is that you can inherit the general configuration of the main map without duplicating it. If the main map
useTileWms
property istrue
, then the single WMS layer is loaded asTileWMS
.Baselayers
All
external
baselayers andcached
ones (WMTS
) comes independently. OnlyLizmap
baselayers (i.e. loaded by QGIS server) are loaded in the singleWMS layer together with map layers.Cached map layers
All
cached
map layers (i.e. tiledWMTS
layers) comes independentlyFiltering features/ filtering by legend
These two functionalities (alone or in combination) works also with single WMS layer
Consideration about layers order
As said, if some layer are
tiled
then they will be not included in the single WMS. This unfortunately has a very high chance of breaking the layers map order and there is no way (at least IMHO) to avoid this. I'll explain by an example the current layer order logic when single WMS is turned on.Take for example the following
layertree
:On the map, the real order is:
CASE WHEN you have selected the
OpensStreetMap
baselayerCASE WHEN you have selected the
Lizmap
BaseLayer E
as baselayerThe base layers are obviously always placed at the bottom, but for the other two block I had to choose (arbitrarily, I would say) which one goes on top . IMHO there is no general right solution for this problem, but maybe you have a some suggestions about that.
Funded by Faunalia