Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix for bug #673
Fixed test script to actually use the cli args that are passed to it


git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@7432 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
gsherman committed Nov 17, 2007
1 parent 6f18425 commit a82999e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion tools/mapserver_export/ms_export.py
Expand Up @@ -343,7 +343,11 @@ def writeMapLayers(self):
self.outFile.write(" TRANSPARENCY " + str(opacity) + "\n")

self.outFile.write(" PROJECTION\n")
proj4Text = lyr.getElementsByTagName("proj4")[0].childNodes[0].nodeValue.encode('utf-8')
# Get the destination srs for this layer and use it to create
# the projection section
destsrs = self.qgs.getElementsByTagName("destinationsrs")[0]
proj4Text = destsrs.getElementsByTagName("proj4")[0].childNodes[0].nodeValue.encode('utf-8')
# the proj4 text string needs to be reformatted to make mapserver happy
self.outFile.write(self.formatProj4(proj4Text))
self.outFile.write(" END\n")
scaleDependent = lyr.getAttribute("scaleBasedVisibilityFlag").encode('utf-8')
Expand Down
2 changes: 1 addition & 1 deletion tools/mapserver_export/test_export.py
Expand Up @@ -22,7 +22,7 @@
import sys
import ms_export
if len(sys.argv) == 3:
ex = ms_export.Qgis2Map('/home/gsherman/town_test.qgs', './town_test.map')
ex = ms_export.Qgis2Map(sys.argv[1], sys.argv[2])
ex.setOptions( 'Meters', 'JPEG', 'TestMap', '800', '600', '', '', '')
ex.writeMapFile()
else:
Expand Down

0 comments on commit a82999e

Please sign in to comment.