Permalink
Browse files

Don't treat OGR autostyle'd text as a mapserver expression (#4965)

  • Loading branch information...
tbonfort committed Aug 4, 2014
1 parent e5c2e65 commit e841969e8b306d73dc9e657c7c1982a748802e9f
Showing with 3 additions and 1 deletion.
  1. +3 −1 mapogr.cpp
View
@@ -2729,7 +2729,6 @@ static int msOGRUpdateStyle(OGRStyleMgrH hStyleMgr, mapObj *map, layerObj *layer
const char *labelTextString = OGR_ST_GetParamStr(hLabelStyle,
OGRSTLabelTextString,
&bIsNull);
- msLoadExpressionString(&(c->text),(char*)labelTextString);
if (c->numlabels == 0) {
/* allocate a new label object */
@@ -2738,6 +2737,9 @@ static int msOGRUpdateStyle(OGRStyleMgrH hStyleMgr, mapObj *map, layerObj *layer
c->numlabels++;
initLabel(c->labels[0]);
}
+ freeExpression(&c->labels[0]->text);
+ c->labels[0]->text.type = MS_STRING;
+ c->labels[0]->text.string = msStrdup(labelTextString);
c->labels[0]->angle = OGR_ST_GetParamDbl(hLabelStyle,
OGRSTLabelAngle, &bIsNull);

0 comments on commit e841969

Please sign in to comment.