[mapserver-commits] r7880 - trunk/mapserver
svn at osgeo.org
svn at osgeo.org
Fri Aug 22 13:12:20 EDT 2008
Author: dmorissette
Date: 2008-08-22 13:12:20 -0400 (Fri, 22 Aug 2008)
New Revision: 7880
Modified:
trunk/mapserver/HISTORY.TXT
trunk/mapserver/mapcontext.c
Log:
Support OpenLayer's ol:opacity extension to OGC Web Map Context docs (#2746)
Modified: trunk/mapserver/HISTORY.TXT
===================================================================
--- trunk/mapserver/HISTORY.TXT 2008-08-22 15:45:03 UTC (rev 7879)
+++ trunk/mapserver/HISTORY.TXT 2008-08-22 17:12:20 UTC (rev 7880)
@@ -12,6 +12,8 @@
Current Version (5.3-dev, SVN trunk):
------------------------------------
+- Support OpenLayer's ol:opacity extension to OGC Web Map Context docs (#2746)
+
- Added MS_VERSION_NUM for use with #if statements in code based on
libmapserver (#2750)
Modified: trunk/mapserver/mapcontext.c
===================================================================
--- trunk/mapserver/mapcontext.c 2008-08-22 15:45:03 UTC (rev 7879)
+++ trunk/mapserver/mapcontext.c 2008-08-22 17:12:20 UTC (rev 7880)
@@ -883,7 +883,7 @@
char *pszProj=NULL;
char *pszValue;
char *pszHash, *pszName=NULL;
- CPLXMLNode *psFormatList, *psFormat, *psStyleList, *psStyle;
+ CPLXMLNode *psFormatList, *psFormat, *psStyleList, *psStyle, *psExtension;
CPLXMLNode *psDimensionList, *psDimension;
int nStyle;
layerObj *layer;
@@ -1151,7 +1151,16 @@
}
}
}
-
+
+ /* Extension */
+ psExtension = CPLGetXMLNode(psLayer, "Extension");
+ if (psExtension != NULL) {
+ pszValue = (char*)CPLGetXMLValue(psExtension, "ol:opacity", NULL);
+ if(pszValue != NULL)
+ {
+ layer->opacity = atof(pszValue)*100;
+ }
+ }
return MS_SUCCESS;
}
More information about the mapserver-commits
mailing list