Skip to content

Feature/exclude basemaps from single wms#685

Merged
rldhont merged 6 commits into3liz:masterfrom
meyerlor:feature/exclude-basemaps-from-single-wms
Feb 4, 2026
Merged

Feature/exclude basemaps from single wms#685
rldhont merged 6 commits into3liz:masterfrom
meyerlor:feature/exclude-basemaps-from-single-wms

Conversation

@meyerlor
Copy link
Copy Markdown
Collaborator

This PR makes the basemap exclusion behavior configurable via the new exclude_basemaps_from_single_wms plugin option, addressing feedback from 3liz/lizmap-web-client#6351 (comment)

Changes:
Previously, basemaps were unconditionally excluded from single WMS requests. Now users can control this behavior:

  • When single WMS enabled + exclude option enabled → basemaps rendered separately (performance boost for COG)
  • When single WMS enabled + exclude option disabled → basemaps included in single WMS (original behavior)
  • When single WMS disabled → basemaps rendered separately (default)

Backward compatibility:
The option defaults to false, maintaining existing behavior for projects that don't explicitly enable it.

Technical details:

  • Added exclude_basemaps_from_single_wms to Options.js
  • Added excludeBasemapsFromSingleWMS property to Map state
  • Modified basemap rendering logic in map.js to conditionally exclude based on configuration

Adds a new configuration option 'exclude_basemaps_from_single_wms' that
allows users to control whether basemaps are included in the single WMS
request when wms_single_request_for_all_layers is enabled.

When enabled, this improves performance for Cloud-Optimized GeoTIFF (COG)
basemaps by preserving their native format instead of converting to PNG.

Disabled by default for backward compatibility.
Fixes two bugs in LwcVersions class that were discovered during development:

- Add missing return statement in LwcVersions.oldest() method
- Fix LwcVersions.find() call in version_checker.py by removing the
  is_dev parameter (method signature was changed but call site wasn't updated)

Also updates .gitignore to exclude all .zip files, not just lizmap.*.zip pattern.
When no server is configured, current_lwc_version() returns None,
which causes TypeErrors when comparing with LwcVersions enum values.

Default to LwcVersions.latest() when no version is available, which
ensures the plugin uses the most recent feature set when no server
is configured yet.
The 'Exclude basemaps from single WMS' checkbox is now disabled (greyed out)
when the 'Load layers as single WMS layer' option is not checked, since it
only has meaning when single WMS is enabled.
@meyerlor
Copy link
Copy Markdown
Collaborator Author

meyerlor commented Jan 12, 2026

WMS-Baselayer

@rldhont
Copy link
Copy Markdown
Contributor

rldhont commented Feb 3, 2026

Hi @meyerlor,

I have merged #667 and #668.
Can you rebase your branch and try to add a test about options like in #690 ?

Test checkbox states and config output for the new option.
@meyerlor
Copy link
Copy Markdown
Collaborator Author

meyerlor commented Feb 4, 2026

nice! I rebased and added the following tests, hope they are sufficient!

  1. Default checkbox states (both unchecked)
  2. Exclude basemaps checkbox is disabled when single WMS is off
  3. Enabling single WMS enables the exclude basemaps checkbox
  4. Config output with various combinations of settings
  5. Disabling single WMS disables the exclude basemaps checkbox again

@rldhont rldhont merged commit e41f835 into 3liz:master Feb 4, 2026
4 checks passed
@rldhont
Copy link
Copy Markdown
Contributor

rldhont commented Feb 4, 2026

Thanks @meyerlor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants