|
20 | 20 | # CHANGES SHOULD NOT BE MADE TO THE writeMapFile METHOD UNLESS YOU
|
21 | 21 | # ARE CHANGING THE QgsMapserverExport CLASS AND YOU KNOW WHAT YOU ARE
|
22 | 22 | # DOING
|
23 |
| -import sys, string |
| 23 | +import sys, string, os |
24 | 24 | from xml.dom import minidom, Node
|
25 | 25 |
|
26 | 26 | # symbol map
|
@@ -69,42 +69,50 @@ def writeMapFile(self):
|
69 | 69 | # write the general map and web settings
|
70 | 70 | print " --- python : map section "
|
71 | 71 | self.writeMapSection()
|
| 72 | + logmsg = "Wrote map section\n" |
72 | 73 | print " --- python : map section done"
|
73 | 74 | # write the projection section
|
74 | 75 | print " --- python : proj section "
|
75 | 76 | self.writeProjectionSection()
|
| 77 | + logmsg += "Wrote projection section\n" |
76 | 78 | print " --- python : proj section done"
|
77 | 79 | # write the output format section
|
78 | 80 | print " --- python : outputformat section "
|
79 | 81 | self.writeOutputFormat()
|
| 82 | + logmsg += "Wrote output format section\n" |
80 | 83 | print " --- python : outputformat section done"
|
81 | 84 | # write the legend section
|
82 | 85 | print " --- python : legend section"
|
83 | 86 | self.writeLegendSection()
|
| 87 | + logmsg += "Wrote legend section\n" |
84 | 88 | print " --- python : legend section done"
|
85 | 89 |
|
86 | 90 | # write the WEB section
|
87 | 91 | print " --- python : web section "
|
88 | 92 | self.writeWebSection()
|
| 93 | + logmsg += "Wrote web section\n" |
89 | 94 | print " --- python : web section done"
|
90 | 95 |
|
91 | 96 | # write the LAYER sections
|
92 | 97 | print " --- python : layer section "
|
93 | 98 | self.writeMapLayers()
|
| 99 | + logmsg += "Wrote map layers\n" |
94 | 100 | print " --- python : layer section done"
|
95 | 101 |
|
96 | 102 | # write the symbol defs section
|
97 | 103 | # must happen after layers so we can build a symbol queue
|
98 | 104 | print " --- python : symbol section "
|
99 | 105 | self.writeSymbolSection()
|
| 106 | + logmsg += "Wrote symbol section\n" |
100 | 107 | print " --- python : symbol section done"
|
101 | 108 |
|
102 | 109 | # END and close the map file
|
103 | 110 | self.outFile.write("END")
|
104 | 111 | self.outFile.close()
|
105 | 112 |
|
106 |
| - ret = "Writing the map file using " + self.project + " " + self.mapFile |
107 |
| - return ret |
| 113 | + logmsg += "Map file completed for " + os.path.basename(self.project) + "\n" |
| 114 | + logmsg += "Map file saved as " + os.path.basename(self.mapFile) + "\n" |
| 115 | + return logmsg |
108 | 116 |
|
109 | 117 | # Write the general parts of the map section
|
110 | 118 | def writeMapSection(self):
|
|
0 commit comments