Skip to content

Commit

Permalink
Don't treat OGR autostyle'd text as a mapserver expression (#4965)
Browse files Browse the repository at this point in the history
  • Loading branch information
tbonfort committed Aug 26, 2014
1 parent e5c2e65 commit e841969
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mapogr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand All @@ -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);
Expand Down

0 comments on commit e841969

Please sign in to comment.