Skip to content

docs: clarify WMS background transparency and test output options - #2306

Open
senanurcetin wants to merge 1 commit into
python-visualization:mainfrom
senanurcetin:docs/wms-transparency-clarification
Open

senanurcetin wants to merge 1 commit into
python-visualization:mainfrom
senanurcetin:docs/wms-transparency-clarification

Conversation

@senanurcetin

Copy link
Copy Markdown

Summary

This PR clarifies the behavior of transparent=True in Folium's WmsTileLayer documentation and strengthens the existing regression test.

Related to #1808.

Problem

The transparent=True option is correctly passed to Leaflet, but it does not make existing black or opaque pixels in WMS imagery transparent.

Transparency depends on the WMS server, the requested layer, and the image format.

Changes

  • Clarified WMS transparency behavior in the user guide.
  • Documented the requirement for a transparency-capable format such as image/png.
  • Added regression assertions verifying that the generated Leaflet options contain:
    • "transparent": true
    • "format": "image/png"

Scope: 2 files modified, 8 lines added. No API or rendering behavior changes.

Testing

  • 5 focused local pytest tests passed.
  • WMS documentation example executed successfully.
  • Generated Leaflet options verified.
  • Python syntax checks passed.
  • git diff --check passed.

Local tests used Folium 0.20.0 and an upstream-derived partial test checkout. Full upstream pytest, Ruff, Black, Sphinx, and Selenium checks were not executed locally and remain subject to CI verification.

AI Assistance Disclosure

AI assistance was used to investigate the issue, review existing implementation and documentation, prepare the changes, and perform focused local validation.

The contribution remains subject to maintainer review and project CI checks.

@senanurcetin

Copy link
Copy Markdown
Author

Hi Folium maintainers,

This PR clarifies the behavior of WMS background transparency and adds assertions for the generated WMS layer options.

The changes are intentionally limited to documentation and tests.

The GitHub Actions workflows currently show action_required. If approval is required for this fork contribution, I'd appreciate your help enabling the checks when convenient.

AI assistance was used in preparing this contribution.

Thank you for your time!

senanurcetin added a commit to senanurcetin/folium that referenced this pull request Oct 20, 2026

This branch has not been deployed

No deployments
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.

1 participant