[mapserver-commits] r9056 - branches/branch-5-4/mapserver
svn at osgeo.org
svn at osgeo.org
Thu May 28 23:54:32 EDT 2009
Author: sdlime
Date: 2009-05-28 23:54:32 -0400 (Thu, 28 May 2009)
New Revision: 9056
Modified:
branches/branch-5-4/mapserver/mapdraw.c
Log:
Fixed placement of annotation when a marker accompanies the label. These are handled just as points regardless of underlying shape type. (#2993)
Modified: branches/branch-5-4/mapserver/mapdraw.c
===================================================================
--- branches/branch-5-4/mapserver/mapdraw.c 2009-05-29 03:29:47 UTC (rev 9055)
+++ branches/branch-5-4/mapserver/mapdraw.c 2009-05-29 03:54:32 UTC (rev 9056)
@@ -2394,10 +2394,14 @@
if(labelPtr->position == MS_AUTO) {
int positions[MS_POSITIONS_LENGTH], npositions=0;
- if(layerPtr->type == MS_LAYER_POLYGON || (layerPtr->type == MS_LAYER_ANNOTATION && cachePtr->shapetype == MS_SHAPE_POLYGON)) {
+ /*
+ ** If the ANNOTATION has an associated marker then the position is handled like a point regardless of underlying shape type. (#2993)
+ ** (Note: might be able to re-order this for more speed.)
+ */
+ if(layerPtr->type == MS_LAYER_POLYGON || (layerPtr->type == MS_LAYER_ANNOTATION && cachePtr->shapetype == MS_SHAPE_POLYGON && cachePtr->numstyles == 0)) {
positions[0]=MS_CC; positions[1]=MS_UC; positions[2]=MS_LC; positions[3]=MS_CL; positions[4]=MS_CR;
npositions = 5;
- } else if(layerPtr->type == MS_LAYER_LINE || (layerPtr->type == MS_LAYER_ANNOTATION && cachePtr->shapetype == MS_SHAPE_LINE)) {
+ } else if(layerPtr->type == MS_LAYER_LINE || (layerPtr->type == MS_LAYER_ANNOTATION && cachePtr->shapetype == MS_SHAPE_LINE && cachePtr->numstyles == 0)) {
positions[0]=MS_UC; positions[1]=MS_LC; positions[2]=MS_CC;
npositions = 3;
} else {
More information about the mapserver-commits
mailing list