jschuengel: thuban/Extensions/umn_mapserver mf_export.py,1.2,1.3
cvs@intevation.de
cvs at intevation.de
Tue Jul 6 16:29:38 CEST 2004
Author: jschuengel
Update of /thubanrepository/thuban/Extensions/umn_mapserver
In directory doto:/tmp/cvs-serv4544
Modified Files:
mf_export.py
Log Message:
Added MF_Symbol to import from mapfile. Added a function to create a circle object like the one from thuban if no one exists.
Index: mf_export.py
===================================================================
RCS file: /thubanrepository/thuban/Extensions/umn_mapserver/mf_export.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- mf_export.py 1 Jul 2004 14:37:29 -0000 1.2
+++ mf_export.py 6 Jul 2004 14:29:36 -0000 1.3
@@ -46,7 +46,7 @@
from Thuban.UI.mainwindow import main_menu
# import Map Object for the Mapfile
-from mapfile import MF_Map
+from mapfile import MF_Map, MF_Symbol
# ###################################
#
@@ -83,6 +83,18 @@
tbextent_to_map(tb_map, map)
tblayer_to_map(tb_map, map)
+def add_circle_symbol(map):
+ if map.get_symbolset().get_symbol(1):
+ return
+ else:
+ new_symbol = MF_Symbol()
+ new_symbol.set_name("circle")
+ new_symbol.set_type(2)
+ new_symbol.set_filled(True)
+ map.get_symbolset().add_symbol(new_symbol)
+
+
+
def export_mapfile(context):
if hasattr(context.mainwindow.canvas.Map(), "extension_umn_mapobj"):
@@ -103,6 +115,9 @@
# set all thuban context to the mapobj
thuban_to_map(context, theMap)
+ #add symbol
+ add_circle_symbol(theMap)
+
# save the map with the integrated mapscript saver
theMap.save_map(path)
More information about the Thuban-devel
mailing list
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)