[mapserver-commits] r8019 - trunk/mapserver
svn at osgeo.org
svn at osgeo.org
Mon Nov 17 08:53:10 EST 2008
Author: Assefa
Date: 2008-11-17 08:53:09 -0500 (Mon, 17 Nov 2008)
New Revision: 8019
Modified:
trunk/mapserver/mapogcsld.c
Log:
SLD: set the default angle to auto for text symbolizers #2806
Modified: trunk/mapserver/mapogcsld.c
===================================================================
--- trunk/mapserver/mapogcsld.c 2008-11-14 04:09:12 UTC (rev 8018)
+++ trunk/mapserver/mapogcsld.c 2008-11-17 13:53:09 UTC (rev 8019)
@@ -2509,6 +2509,11 @@
if (psRoot && psClass && psLayer)
{
+ /*set the angle by defulat to auto. the angle can be
+ modified Label Placement #2806*/
+ psClass->label.autoangle = MS_TRUE;
+
+
/* label */
/* support literal expression and propertyname
- <TextSymbolizer><Label>MY_COLUMN</Label>
@@ -2861,17 +2866,23 @@
CPLXMLNode *psOffset = NULL;
if (psRoot && psClass)
{
+ /*if there is a line placement, we will assume that the
+ best setting for mapserver would be for the text to follow
+ the line #2806*/
+ psClass->label.autofollow = MS_TRUE;
+ psClass->label.autoangle = MS_TRUE;
+
psOffset = CPLGetXMLNode(psRoot, "PerpendicularOffset");
if (psOffset && psOffset->psChild && psOffset->psChild->pszValue)
{
psClass->label.offsetx = atoi(psOffset->psChild->pszValue);
psClass->label.offsety = atoi(psOffset->psChild->pszValue);
- /*if there is a line placement, we will assume that the
- best setting for mapserver would be for the text to follow
- the line #2806*/
- psClass->label.autofollow = MS_TRUE;
- psClass->label.autoangle = MS_TRUE;
+ /*if there is a PerpendicularOffset, we will assume that the
+ best setting for mapserver would be for use angle 0 and the
+ the offset #2806*/
+ psClass->label.autoangle = MS_FALSE;
+ psClass->label.autofollow = MS_FALSE;
}
}
More information about the mapserver-commits
mailing list