<div dir="ltr"><div>Hi Guys:</div><div><br></div><div>I'm having issues with the Python implementation of mapscript.  It appears some support is missing.</div><div>I'm using mapserver 6.4.1-2 on Arch Linux.</div><div>


python2 -V 2.7.8</div><div>mapscript.MS_VERSION = 6.4.1</div><div><br></div><div>1)  Transparency not preserved with m.draw() on a mapObj()</div><div>Individual Layer tansparency using m.draw() when inside a style object:<br>


mStyle = ms.styleObject()<br>mStyle.opacity = 50</div><div><br></div><div>If I do:</div><div>m.save('tmp.map')</div><div>And load the resulting map with the mapserver CGI it works fine, the layer is at whatever transparency I set.</div>

<div>Map file:</div><div>...<br><div>CLASS</div><div>      STYLE</div><div>        COLOR 255 255 255</div><div>        OPACITY 50</div><div>        OUTLINECOLOR 0 0 0</div><div>      END # STYLE</div><div>END # CLASS</div>

</div><div>...</div><div><br></div><div>2) Setting labelObj().type seems to have no effect.</div><div>labelObj.type = ms.MS_TRUETYPE</div><div>labelObj.type = ms.MS_BITMAP<br></div><div>labelObj.type = 0<br>
</div><div>labelObj.type = 1<br></div><div>The resulting map definition file has:</div><div>..<br>TYPE BITMAP<br></div><div>..</div><div><br></div><div>3) Setting labelObj().size seems to have no effect.<br></div><div>the mapfile has no 'SIZE' attribute when printed out.  I do end up with a SHADOWSIZE, which I'm guessing is default, or has to do with the BITMAP type that's being forced.</div>
<div><br></div><div>4)  I can't seem to set a pattern.  It looks like mapscript.py includes the functionality, but it's giving an error.  Traceback from when my code hands it off:</div><div>...</div><div>    mStyle.pattern = "5 5 5 5"<br>
<div>  File "/usr/lib/python2.7/site-packages/mapscript.py", line 535, in <lambda></div><div>    __setattr__ = lambda self, name, value: _swig_setattr(self, styleObj, name, value)</div><div>  File "/usr/lib/python2.7/site-packages/mapscript.py", line 51, in _swig_setattr</div>
<div>    return _swig_setattr_nondynamic(self,class_type,name,value,0)</div><div>  File "/usr/lib/python2.7/site-packages/mapscript.py", line 44, in _swig_setattr_nondynamic</div><div>    if method: return method(self,value)</div>
<div>TypeError: in method 'styleObj_pattern_set', argument 2 of type 'double [MS_MAXPATTERNLENGTH]'</div></div><div>...<br></div><div><br></div><div>Am I doing something wrong, or are these issues with the library/Python implementation?</div>
<div><br></div><div>Thank you.</div><div><br></div><div><br></div><div>
<br></div>-- <br>A computer without Windows is like chocolate cake without mustard.

</div>