[mapserver-commits] r12803 - sandbox/sdlime/rfc-77
svn at osgeo.org
svn at osgeo.org
Fri Nov 25 14:06:31 EST 2011
Author: sdlime
Date: 2011-11-25 11:06:31 -0800 (Fri, 25 Nov 2011)
New Revision: 12803
Modified:
sandbox/sdlime/rfc-77/maplegend.c
Log:
Make sure we have to grow class labels in the legend embed code...
Modified: sandbox/sdlime/rfc-77/maplegend.c
===================================================================
--- sandbox/sdlime/rfc-77/maplegend.c 2011-11-25 18:59:23 UTC (rev 12802)
+++ sandbox/sdlime/rfc-77/maplegend.c 2011-11-25 19:06:31 UTC (rev 12803)
@@ -703,8 +703,10 @@
GET_LAYER(map, l)->class[0]->styles[0]->symbol = s;
GET_LAYER(map, l)->class[0]->styles[0]->color.pen = -1;
- if(msGrowClassLabels(GET_LAYER(map, l)->class[0]) == NULL) return(MS_FAILURE);
- initLabel(GET_LAYER(map, l)->class[0]->labels[0]); /* necessary? */
+ if(!GET_LAYER(map, l)->class[0]->labels) {
+ if(msGrowClassLabels(GET_LAYER(map, l)->class[0]) == NULL) return MS_FAILURE;
+ }
+ initLabel(GET_LAYER(map, l)->class[0]->labels[0]);
GET_LAYER(map, l)->class[0]->labels[0]->force = MS_TRUE;
GET_LAYER(map, l)->class[0]->labels[0]->size = MS_MEDIUM; /* must set a size to have a valid label definition */
GET_LAYER(map, l)->class[0]->labels[0]->priority = MS_MAX_LABEL_PRIORITY;
More information about the mapserver-commits
mailing list