[mapserver-commits] r8568 - trunk/mapserver
svn at osgeo.org
svn at osgeo.org
Tue Feb 17 17:19:43 EST 2009
Author: tomkralidis
Date: 2009-02-17 17:19:43 -0500 (Tue, 17 Feb 2009)
New Revision: 8568
Modified:
trunk/mapserver/HISTORY.TXT
trunk/mapserver/mapwms.c
Log:
fix WMS LegendURL to print sld_version for 1.3.0 Capabilities (#473)
Modified: trunk/mapserver/HISTORY.TXT
===================================================================
--- trunk/mapserver/HISTORY.TXT 2009-02-17 22:09:07 UTC (rev 8567)
+++ trunk/mapserver/HISTORY.TXT 2009-02-17 22:19:43 UTC (rev 8568)
@@ -12,6 +12,8 @@
Current Version (5.3-dev, SVN trunk):
------------------------------------
+- fix WMS LegendURL to print sld_version for 1.3.0 Capabilities (#473)
+
- add GetSchemaExtension to WMS to support GetStyles in Capabilities XML (#473)
- move xlink declaration to root of WMS 1.3.0 DescribeLayerResponse
Modified: trunk/mapserver/mapwms.c
===================================================================
--- trunk/mapserver/mapwms.c 2009-02-17 22:09:07 UTC (rev 8567)
+++ trunk/mapserver/mapwms.c 2009-02-17 22:19:43 UTC (rev 8568)
@@ -1672,9 +1672,15 @@
for (i=0; i<iclassgroups; i++)
{
char *name_encoded = msEncodeHTMLEntities(lp->name);
- sprintf(legendurl, "%sversion=%s&service=WMS&request=GetLegendGraphic&layer=%s&format=%s&STYLE=%s",
- script_url_encoded,msOWSGetVersionString(nVersion, szVersionBuf),name_encoded,
- mimetype, classgroups[i]);
+ if (nVersion >= OWS_1_3_0)
+ sprintf(legendurl, "%sversion=%s&service=WMS&request=GetLegendGraphic&sld_version=1.1.0&layer=%s&format=%s&STYLE=%s",
+ script_url_encoded,msOWSGetVersionString(nVersion, szVersionBuf),name_encoded,
+ mimetype, classgroups[i]);
+ else
+ sprintf(legendurl, "%sversion=%s&service=WMS&request=GetLegendGraphic&layer=%s&format=%s&STYLE=%s",
+ script_url_encoded,msOWSGetVersionString(nVersion, szVersionBuf),name_encoded,
+ mimetype, classgroups[i]);
+
msFree(name_encoded);
msIO_fprintf(stdout, " <Style>\n");
More information about the mapserver-commits
mailing list