[mapserver-commits] r11878 - in branches/branch-6-0/mapserver: .
mapscript/php
svn at osgeo.org
svn at osgeo.org
Thu Jul 7 05:41:07 EDT 2011
Author: tbonfort
Date: 2011-07-07 02:41:07 -0700 (Thu, 07 Jul 2011)
New Revision: 11878
Modified:
branches/branch-6-0/mapserver/
branches/branch-6-0/mapserver/HISTORY.TXT
branches/branch-6-0/mapserver/maplayer.c
branches/branch-6-0/mapserver/mapscript/php/
Log:
Fix attribute binding for layer styles (#3941)
Property changes on: branches/branch-6-0/mapserver
___________________________________________________________________
Modified: svn:mergeinfo
- /sandbox/aboudreault:9103-9193
/sandbox/mapserver6:10108-10742
+ /sandbox/aboudreault:9103-9193
/sandbox/mapserver6:10108-10742
/trunk/mapserver:11877
Modified: branches/branch-6-0/mapserver/HISTORY.TXT
===================================================================
--- branches/branch-6-0/mapserver/HISTORY.TXT 2011-07-07 09:39:19 UTC (rev 11877)
+++ branches/branch-6-0/mapserver/HISTORY.TXT 2011-07-07 09:41:07 UTC (rev 11878)
@@ -14,6 +14,7 @@
Version 6.0.1 (SVN branch-6-0):
---------------------------
+- Fix attribute binding for layer styles (#3941)
- Added missing fclose() when writing query files (#3943)
Modified: branches/branch-6-0/mapserver/maplayer.c
===================================================================
--- branches/branch-6-0/mapserver/maplayer.c 2011-07-07 09:39:19 UTC (rev 11877)
+++ branches/branch-6-0/mapserver/maplayer.c 2011-07-07 09:41:07 UTC (rev 11878)
@@ -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))
Property changes on: branches/branch-6-0/mapserver/mapscript/php
___________________________________________________________________
Modified: svn:mergeinfo
- /sandbox/aboudreault/mapscript/php3:9103-9193
/sandbox/mapserver6/mapscript/php:10108-10742
+ /sandbox/aboudreault/mapscript/php3:9103-9193
/sandbox/mapserver6/mapscript/php:10108-10742
/trunk/mapserver/mapscript/php:11877
More information about the mapserver-commits
mailing list