[mapserver-commits] r11606 - trunk/mapserver
svn at osgeo.org
svn at osgeo.org
Wed Apr 20 16:51:29 EDT 2011
Author: tamas
Date: 2011-04-20 13:51:29 -0700 (Wed, 20 Apr 2011)
New Revision: 11606
Modified:
trunk/mapserver/HISTORY.TXT
trunk/mapserver/mapunion.c
Log:
Union Layer: fix for the STYLEITEM AUTO option (#3674)
Modified: trunk/mapserver/HISTORY.TXT
===================================================================
--- trunk/mapserver/HISTORY.TXT 2011-04-20 16:56:01 UTC (rev 11605)
+++ trunk/mapserver/HISTORY.TXT 2011-04-20 20:51:29 UTC (rev 11606)
@@ -15,6 +15,8 @@
Current Version (SVN trunk):
----------------------------
+- Union Layer: fix for the STYLEITEM AUTO option (#3674)
+
- Union Layer: Add support for the layer FILTER expressions,
add "Union:SourceLayerVisible" predefined attribute (#3674)
Modified: trunk/mapserver/mapunion.c
===================================================================
--- trunk/mapserver/mapunion.c 2011-04-20 16:56:01 UTC (rev 11605)
+++ trunk/mapserver/mapunion.c 2011-04-20 20:51:29 UTC (rev 11606)
@@ -398,19 +398,19 @@
srclayer = &layerinfo->layers[layerinfo->layerIndex];
while (srclayer->vtable->LayerNextShape(srclayer, shape) == MS_SUCCESS)
{
- layerinfo->classIndex = msShapeGetClass(srclayer, layer->map, shape, layerinfo->classgroup, layerinfo->nclasses);
- if((layerinfo->classIndex == -1) || (srclayer->class[layerinfo->classIndex]->status == MS_OFF))
+ if(strcasecmp(layer->styleitem, "AUTO") != 0)
{
- // this shape is not visible, skip it
- msFreeShape(shape);
- if (rv == MS_SUCCESS)
- continue;
- else
- break;
- }
-
- if(layer->styleitem)
- {
+ /* need to retrieve the source layer classindex if styleitem AUTO is set */
+ layerinfo->classIndex = msShapeGetClass(srclayer, layer->map, shape, layerinfo->classgroup, layerinfo->nclasses);
+ if((layerinfo->classIndex == -1) || (srclayer->class[layerinfo->classIndex]->status == MS_OFF))
+ {
+ // this shape is not visible, skip it
+ msFreeShape(shape);
+ if (rv == MS_SUCCESS)
+ continue;
+ else
+ break;
+ }
if(strcasecmp(srclayer->styleitem, "AUTO") != 0)
{
/* Generic feature style handling as per RFC-61 */
More information about the mapserver-commits
mailing list