[Thuban-commits] r2859 - trunk/thuban/Extensions/umn_mapserver

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Tue Jul 29 09:14:45 CEST 2008


Author: elachuni
Date: 2008-07-29 09:14:45 +0200 (Tue, 29 Jul 2008)
New Revision: 2859

Modified:
   trunk/thuban/Extensions/umn_mapserver/mapfile.py
   trunk/thuban/Extensions/umn_mapserver/mf_export.py
Log:
Replacing numeric constant for symbolic one in umn_mapserver extension,
to make the circle symbol work with new versions of mapscript.


Modified: trunk/thuban/Extensions/umn_mapserver/mapfile.py
===================================================================
--- trunk/thuban/Extensions/umn_mapserver/mapfile.py	2008-07-29 06:17:34 UTC (rev 2858)
+++ trunk/thuban/Extensions/umn_mapserver/mapfile.py	2008-07-29 07:14:45 UTC (rev 2859)
@@ -327,7 +327,7 @@
     style, imagepath, transparent, transparentcolor, character, antialias,
     font, gap, position, linecap, linejoin, linejoinmaxsize, setPoints(),
     getPoints(), setStyle()
-    """    
+    """
     def __init__(self, mf_symbol = "newone"):
         # create a circle Object like shown in Thuban
         # because Thuban don't support other symbols
@@ -335,13 +335,14 @@
 	# TODO: include the options to create a symbol, but
 	#      first implement a methode to edit Symbols in Thuban
         if mf_symbol == "newone":
-            mf_symbol = symbolObj("")            
+            mf_symbol = symbolObj("")
             newpoint = pointObj()
             newpoint.x = 1
             newpoint.y = 1
             newline = lineObj()
             newline.add(newpoint)
             mf_symbol.setPoints(newline)
+            mf_symbol.type = mapscript.MS_SYMBOL_ELLIPSE
         
         self._symbol = mf_symbol
     

Modified: trunk/thuban/Extensions/umn_mapserver/mf_export.py
===================================================================
--- trunk/thuban/Extensions/umn_mapserver/mf_export.py	2008-07-29 06:17:34 UTC (rev 2858)
+++ trunk/thuban/Extensions/umn_mapserver/mf_export.py	2008-07-29 07:14:45 UTC (rev 2859)
@@ -25,6 +25,7 @@
 import os
 
 # mapscript
+import mapscript
 from mapscript import mapObj
 
 # wxPython support
@@ -113,8 +114,8 @@
     else:
         new_symbol = MF_Symbol()
         new_symbol.set_name("circle")
-        new_symbol.set_type(2)
-        new_symbol.set_filled(True)
+        new_symbol.set_type(mapscript.MS_SYMBOL_ELLIPSE)
+        new_symbol.set_filled(False)
         map.get_symbolset().add_symbol(new_symbol)
 
 def write_creatorcomment(path,file):



More information about the Thuban-commits mailing list