[mapserver-commits] r11667 - trunk/mapserver
svn at osgeo.org
svn at osgeo.org
Tue May 10 10:39:41 EDT 2011
Author: tamas
Date: 2011-05-10 07:39:41 -0700 (Tue, 10 May 2011)
New Revision: 11667
Modified:
trunk/mapserver/mapunion.c
Log:
Union layer: Fix for the item initialization at the source layer (#3859)
Modified: trunk/mapserver/mapunion.c
===================================================================
--- trunk/mapserver/mapunion.c 2011-05-10 12:52:09 UTC (rev 11666)
+++ trunk/mapserver/mapunion.c 2011-05-10 14:39:41 UTC (rev 11667)
@@ -333,6 +333,21 @@
for (i = 0; i < layerinfo->layerCount; i++)
{
layerObj* srclayer = &layerinfo->layers[i];
+
+ if (layer->styleitem && layer->numitems == 0)
+ {
+ /* need to initialize items */
+ /* reopen the layer to clear all expressions*/
+ msLayerClose(srclayer);
+ layerinfo->status[i] = msLayerOpen(srclayer);
+ if (layerinfo->status[i] != MS_SUCCESS)
+ return MS_FAILURE;
+
+ /* get only the required items */
+ if (msLayerWhichItems(srclayer, FALSE, NULL) != MS_SUCCESS)
+ return MS_FAILURE;
+ }
+
srcRect = rect;
#ifdef USE_PROJ
if(srclayer->transform == MS_TRUE && srclayer->project && layer->transform == MS_TRUE && layer->project &&msProjectionsDiffer(&(srclayer->projection), &(layer->projection)))
More information about the mapserver-commits
mailing list