Skip to content

Add missing 'version' param to get WMS legends (ref #11)#12

Open
marcantoinedupre wants to merge 1 commit into
ignaciofagian:masterfrom
makinacorpus:fix/add-missing-wms-version
Open

Add missing 'version' param to get WMS legends (ref #11)#12
marcantoinedupre wants to merge 1 commit into
ignaciofagian:masterfrom
makinacorpus:fix/add-missing-wms-version

Conversation

@marcantoinedupre

@marcantoinedupre marcantoinedupre commented Jan 30, 2025

Copy link
Copy Markdown

Here is a one-line fix to add the missing version param to WMS GetLegendGraphic requests (solves #11). The value passed is the one from Leaflet (default or overridden value).

According to the spec:

The VERSION parameter is mandatory in requests other than GetCapabilities.

OpenGIS Web Map Service (WMS) Implementation Specification, p. 11.

And some map servers enforce this, as the WMSServer component of an Arcgis server.

It would be awesome if you could merge it and release! 🙏

@marcantoinedupre marcantoinedupre force-pushed the fix/add-missing-wms-version branch from 077dc04 to 6040838 Compare January 31, 2025 15:23
@marcantoinedupre

Copy link
Copy Markdown
Author

I have updated my fix. The version value is at layer.wmsParams.version, previously I thought it was layer.version. (The latter still solved my issue: it used to pass the query param version=undefined with GetLegendGraphic and the map server happily accepted it :D )

@marcantoinedupre

Copy link
Copy Markdown
Author

Any news on this? @ignaciofagian @dandormont

@dandormont

Copy link
Copy Markdown
Contributor

Sorry I'm not the maintainer here. I just happen to have contributed some minor fixes. I'm also not all that familiar with WMS to be perfectly honest 🤔

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