[mapserver-users] Style pattern on mapscript

Umberto Nicoletti umberto.nicoletti at gmail.com
Tue Jun 17 08:02:21 PDT 2014


Andrea,
it seems we never got around to properly wrap styleObj.pattern in mapscript.

Actually it is not hard to do it, just provide a getPattern/setPattern
index-based function
in mapscript/swiginc/style.i
and, of course, rebuild mapscript. You could use the get/setBinding
functions as a starting point and I could help you, if you want.

/Umberto



On Tue, Jun 17, 2014 at 3:53 PM, Andrea Peri <aperi2007 at gmail.com> wrote:

> Hi,
>
> it seem to exist,
> but every sintax I try , I'm have an error.
> like this:
>
> new_style.pattern = [1.0, 2.0]
>
> >Traceback (most recent call last):
> >  File "generator.py", line 136, in <module>
> >    new_style.pattern = [1.0, 2.0]
> >  File
> "C:\my-programs\osgeo4w\apps\Python27\lib\site-packages\mapscript.py", li
> >ne 538, in <lambda>
> >    __setattr__ = lambda self, name, value: _swig_setattr(self, styleObj,
> name,
> >value)
> >  File
> "C:\my-programs\osgeo4w\apps\Python27\lib\site-packages\mapscript.py", li
> >ne 48, in _swig_setattr
> >    return _swig_setattr_nondynamic(self,class_type,name,value,0)
> >  File
> "C:\my-programs\osgeo4w\apps\Python27\lib\site-packages\mapscript.py", li
> >ne 41, in _swig_setattr_nondynamic
> >    if method: return method(self,value)
> >TypeError: in method 'styleObj_pattern_set', argument 2 of type 'double
> [MS_MAXP
> >ATTERNLENGTH]'
>
> I don't understand if is a bug or a my wrong on python use ff pattern.
>
> Unfortunately it seem not documentated at all.
>
> any help is welcome, thx.
>
> Andrea.
>
>
> 2014-06-17 11:42 GMT+02:00 Andrea Peri <aperi2007 at gmail.com>:
> > Hi,
> >
> > Is available the style pattern in mapscript ?
> >
> > Thx,
> >
> > --
> > -----------------
> > Andrea Peri
> > . . . . . . . . .
> > qwerty àèìòù
> > -----------------
>
>
>
> --
> -----------------
> Andrea Peri
> . . . . . . . . .
> qwerty àèìòù
> -----------------
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20140617/929c817a/attachment.html>


More information about the mapserver-users mailing list