[mapserver-commits] r8606 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Sun Feb 22 17:35:14 EST 2009


Author: tamas
Date: 2009-02-22 17:35:13 -0500 (Sun, 22 Feb 2009)
New Revision: 8606

Modified:
   trunk/mapserver/HISTORY.TXT
   trunk/mapserver/mapogr.cpp
Log:
Setting up the same size units between the OGR auto-style and the OGR label attribute binding option (#2900)

Modified: trunk/mapserver/HISTORY.TXT
===================================================================
--- trunk/mapserver/HISTORY.TXT	2009-02-22 21:42:38 UTC (rev 8605)
+++ trunk/mapserver/HISTORY.TXT	2009-02-22 22:35:13 UTC (rev 8606)
@@ -12,6 +12,9 @@
 Current Version (SVN trunk):
 ----------------------------
 
+- Setting up the same size units between the OGR auto-style and the 
+  OGR label attribute binding option (#2900)
+
 - Take better care of the extra items with the inline layers to 
   prevent from memory corruption (#2870)
 

Modified: trunk/mapserver/mapogr.cpp
===================================================================
--- trunk/mapserver/mapogr.cpp	2009-02-22 21:42:38 UTC (rev 8605)
+++ trunk/mapserver/mapogr.cpp	2009-02-22 22:35:13 UTC (rev 8606)
@@ -598,6 +598,10 @@
                 hLabelStyle = hStylePart;
             else if (hStylePart)
                 OGR_ST_Destroy(hStylePart);
+
+          /* Setting up the size units according to msOGRLayerGetAutoStyle*/
+          if (hStylePart && layer->map)
+            OGR_ST_SetUnit(hStylePart, OGRSTUPixel, layer->map->cellsize*72.0*39.37);
         }
         int bDefault;
         if (itemindexes[i] == MSOGR_LABELTEXTINDEX)
@@ -892,6 +896,9 @@
             poLabelStyle = (OGRStyleLabel*)poStylePart;
         else if (poStylePart)
             delete poStylePart;
+        /* Setting up the size units according to msOGRLayerGetAutoStyle*/
+        if (poStylePart && layer->map)
+            poStylePart->SetUnit(OGRSTUPixel, layer->map->cellsize*72.0*39.37);
     }
     GBool bDefault;
     if (itemindexes[i] == MSOGR_LABELTEXTINDEX)



More information about the mapserver-commits mailing list