[mapserver-users] Re: Mapserver and Zope
Norman Vine
Norman Vine" <nhv@cape.com
Wed, 18 Sep 2002 14:15:30 -0400
Sven Jacobi writes:
>
> I'm trying to use Mapserver in Zope which is Python based.
> I've already "swigged" the libraries to Python and it seemed
> to work.
> But now I have got several problems:
> 1.When I try to test Mapserver with Python, I get a Segementation Fault
> when calling the draw()-function...below the code:
>
> import sys
> from mapscript import *
>
> def drawmap(width=400, height=300, align="left"):
> mymap = mapObj("/home/...")
> mymap.width=width
> mymap.height=height
> myimage=mymap.draw()
myimage.save("mymap.png")
# You might want to use
myImageString = myimage.saveToString()
HTH
Norman