[mapserver-users] Re: Mapserver and Zope

Norman Vine nhv at cape.com
Wed Sep 18 11:15:30 PDT 2002


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





More information about the MapServer-users mailing list