<div dir="auto">Would style ids be just index values (e.g. 0 for the first style associated) or names? I have no issues conceptually with the addition - good idea!</div><div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Mon, Sep 28, 2026 at 12:06 PM Seth G via MapServer-dev <<a href="mailto:mapserver-dev@lists.osgeo.org">mapserver-dev@lists.osgeo.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi all,<br>
<br>
I've been working on the MapServer SLD functionality recently, and making use of GetStyles WMS requests to return SLD for client-side styling in OpenLayers (thanks to the newly graduated OSGeo project GeoStyler [1]).<br>
<br>
Currently all styles for a layer are returned for a GetStyles request. For example:<br>
<br>
<a href="https://mapserver-workshop-k8hvw.ondigitalocean.app/?map=/etc/mapserver/polygons.map&REQUEST=GetStyles&SERVICE=WMS&VERSION=1.3.0&LAYERS=buildings" rel="noreferrer" target="_blank">https://mapserver-workshop-k8hvw.ondigitalocean.app/?map=/etc/mapserver/polygons.map&REQUEST=GetStyles&SERVICE=WMS&VERSION=1.3.0&LAYERS=buildings</a><br>
<br>
Has 2 different styles (defined by the GROUP of the CLASSes in a LAYER in the Mapfile):<br>
<br>
<UserStyle><br>
<se:Name>university</se:Name><br>
...<br>
<UserStyle><br>
<se:Name>other</se:Name><br>
...<br>
<br>
It would be nice to be able to pick just one of these by supplying a STYLES= parameter, in the same way GetMap, GetFeatureInfo and GetLegendGraphic work. Reusing it for GetStyles keeps the same meaning and the same comma-separated, one style per layer format.<br>
<br>
In terms of other software, GeoServer seems to support GetStyles [2], but I see no mention of it in their docs [3].<br>
QGIS also supports GetStyles [4], but has no STYLES= parameter. <br>
<br>
GetStyles is hard to track down in terms of where it fits with WMS version numbers, WMS 1.1.1 has no GetStyles, but the SLD 1.0.0 specification extends WMS 1.1.x with it. WMS 1.3.0 uses SLD 1.1.0, which seems to have dropped GetStyles completely. However MapServer still supports it for all WMS versions. It is documented in <a href="https://docs.ogc.org/is/02-070/02-070/pdf" rel="noreferrer" target="_blank">https://docs.ogc.org/is/02-070/02-070/pdf</a> in section 13.1<br>
<br>
Adding a "vendor" parameter of STYLES would be a handy addition to MapServer, and may also help with implementing OGC API Styles which has a URL per style (/collections/{id}/styles/{styleId}. If the parameter is missing or empty all styles would be returned as in the current case. <br>
<br>
Anyone with thoughts/comments on the above?<br>
<br>
Seth<br>
<br>
<br>
<br>
[1] <a href="https://www.osgeo.org/projects/geostyler/" rel="noreferrer" target="_blank">https://www.osgeo.org/projects/geostyler/</a><br>
[2] <a href="https://discourse.osgeo.org/t/geoserver-devel-does-getstyles-work-in-geoserver-2-12/104946" rel="noreferrer" target="_blank">https://discourse.osgeo.org/t/geoserver-devel-does-getstyles-work-in-geoserver-2-12/104946</a><br>
[3] <a href="https://docs.geoserver.org/main/" rel="noreferrer" target="_blank">https://docs.geoserver.org/main/</a><br>
[4] <a href="https://docs.qgis.org/3.44/en/docs/server_manual/services/wms.html#wms-getstyle" rel="noreferrer" target="_blank">https://docs.qgis.org/3.44/en/docs/server_manual/services/wms.html#wms-getstyle</a><br>
_______________________________________________<br>
MapServer-dev mailing list<br>
<a href="mailto:MapServer-dev@lists.osgeo.org" target="_blank">MapServer-dev@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/mapserver-dev" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/mapserver-dev</a><br>
</blockquote></div></div>