[mapserver-commits] r8930 - trunk/mapserver
svn at osgeo.org
svn at osgeo.org
Tue Apr 21 21:19:43 EDT 2009
Author: assefa
Date: 2009-04-21 21:19:43 -0400 (Tue, 21 Apr 2009)
New Revision: 8930
Modified:
trunk/mapserver/maplegend.c
Log:
GetLegendGrpahic does not work with sizeunits is set #2983
Modified: trunk/mapserver/maplegend.c
===================================================================
--- trunk/mapserver/maplegend.c 2009-04-20 05:01:27 UTC (rev 8929)
+++ trunk/mapserver/maplegend.c 2009-04-22 01:19:43 UTC (rev 8930)
@@ -486,8 +486,10 @@
/* set the scale factor so that scale dependant symbols are drawn in the legend with their default size */
if(cur->layer->sizeunits != MS_PIXELS)
+ {
+ map->cellsize = msAdjustExtent(&(map->extent), map->width, map->height);
cur->layer->scalefactor = (msInchesPerUnit(cur->layer->sizeunits,0)/msInchesPerUnit(map->units,0)) / map->cellsize;
-
+ }
if(msDrawLegendIcon(map, cur->layer, cur->theclass, map->legend.keysizex, map->legend.keysizey, image, HMARGIN, (int) pnt.y) != MS_SUCCESS)
return NULL;
More information about the mapserver-commits
mailing list