[Mapserver-users] mapscript python
Vinko Vrsalovic
vinko at cprsig.cl
Mon Dec 16 07:56:59 PST 2002
On Wed, Dec 11, 2002 at 02:50:26PM +0100, Sven Jacobi wrote:
[...]
> import sys
> from mapscript import *
>
> def drawmap():
> mymap = mapObj("/home/jacobi/...")
> mymap.width=600
> mymap.height=400
> myimage=mymap.draw()
> #out = mymap.save("blies")
> out = myimage.saveImage("blies.png",MS_PNG,50,0,50)
>
> return out
>
> drawmap()
>
>
> Any hints???
Are you sure the problem is with Python/Mapscript and not with the image
and/or mapfile?
Try displaying the mapfile with the CGI version of MapServer to check
it.
Do you have STATUS DEFAULT instead of STATUS ON in the raster layer?
Do you have the world file for your TIFF file?
Is the image in 8 bit color? (if it's colored)
The code looks right, so the problem probably is one of the above
Oh, and BTW what do you mean by it's not working?
You get a Python error?
blies.png is blank?
blies.png has only the vector layers?
--
Vinko Vrsalovic <el[|- at -|]vinko.cl>
http://www.cprsig.cl
More information about the MapServer-users
mailing list