[mapserver-commits] r11877 - trunk/mapserver
svn at osgeo.org
svn at osgeo.org
Thu Jul 7 05:39:19 EDT 2011
Author: tbonfort
Date: 2011-07-07 02:39:19 -0700 (Thu, 07 Jul 2011)
New Revision: 11877
Modified:
trunk/mapserver/HISTORY.TXT
trunk/mapserver/maplayer.c
Log:
Fix attribute binding for layer styles (#3941)
Modified: trunk/mapserver/HISTORY.TXT
===================================================================
--- trunk/mapserver/HISTORY.TXT 2011-07-07 09:28:17 UTC (rev 11876)
+++ trunk/mapserver/HISTORY.TXT 2011-07-07 09:39:19 UTC (rev 11877)
@@ -14,6 +14,7 @@
Current Version (SVN trunk, 6.1-dev, future 6.2):
-------------------------------------------------
+- Fix attribute binding for layer styles (#3941)
- Added missing fclose() when writing query files (#3943)
Modified: trunk/mapserver/maplayer.c
===================================================================
--- trunk/mapserver/maplayer.c 2011-07-07 09:28:17 UTC (rev 11876)
+++ trunk/mapserver/maplayer.c 2011-07-07 09:39:19 UTC (rev 11877)
@@ -511,6 +511,12 @@
nt += msCountChars(layer->class[i]->expression.string, '[');
nt += layer->class[i]->label.numbindings;
+ for(j=0; j<layer->class[i]->label.numstyles; j++) {
+ if(layer->class[i]->label.styles[j]->rangeitem) nt++;
+ nt += layer->class[i]->label.styles[j]->numbindings;
+ if(layer->class[i]->label.styles[j]->_geomtransform.type == MS_GEOMTRANSFORM_EXPRESSION)
+ nt += msCountChars(layer->class[i]->label.styles[j]->_geomtransform.string, '[');
+ }
if(layer->class[i]->text.type == MS_EXPRESSION || (layer->class[i]->text.string && strchr(layer->class[i]->text.string,'[') != NULL && strchr(layer->class[i]->text.string,']') != NULL))
nt += msCountChars(layer->class[i]->text.string, '[');
@@ -553,9 +559,16 @@
if(layer->class[i]->styles[j]->rangeitem) layer->class[i]->styles[j]->rangeitemindex = string2list(layer->items, &(layer->numitems), layer->class[i]->styles[j]->rangeitem);
for(k=0; k<MS_STYLE_BINDING_LENGTH; k++)
if(layer->class[i]->styles[j]->bindings[k].item) layer->class[i]->styles[j]->bindings[k].index = string2list(layer->items, &(layer->numitems), layer->class[i]->styles[j]->bindings[k].item);
- if(layer->class[i]->styles[j]->_geomtransform.type == MS_GEOMTRANSFORM_EXPRESSION)
+ if(layer->class[i]->styles[j]->_geomtransform.type == MS_GEOMTRANSFORM_EXPRESSION)
msTokenizeExpression(&(layer->class[i]->styles[j]->_geomtransform), layer->items, &(layer->numitems));
}
+ for(j=0; j<layer->class[i]->label.numstyles; j++) {
+ if(layer->class[i]->label.styles[j]->rangeitem) layer->class[i]->label.styles[j]->rangeitemindex = string2list(layer->items, &(layer->numitems), layer->class[i]->label.styles[j]->rangeitem);
+ for(k=0; k<MS_STYLE_BINDING_LENGTH; k++)
+ if(layer->class[i]->label.styles[j]->bindings[k].item) layer->class[i]->label.styles[j]->bindings[k].index = string2list(layer->items, &(layer->numitems), layer->class[i]->label.styles[j]->bindings[k].item);
+ if(layer->class[i]->label.styles[j]->_geomtransform.type == MS_GEOMTRANSFORM_EXPRESSION)
+ msTokenizeExpression(&(layer->class[i]->label.styles[j]->_geomtransform), layer->items, &(layer->numitems));
+ }
/* class text and label bindings */
if(layer->class[i]->text.type == MS_EXPRESSION || (layer->class[i]->text.string && strchr(layer->class[i]->text.string,'[') != NULL && strchr(layer->class[i]->text.string,']') != NULL))
More information about the mapserver-commits
mailing list