You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I try
new_style = mapscript.styleObj()
si = testmap.getLayer(li).getClass(ci).insertStyle(new_style)
new_style.patternlength = 2
new_style.pattern = [2.0,2.0,0,0,0,0,0,0,0,0]
But it return an error:
new_style.pattern = [2.0,2.0,0,0,0,0,0,0,0,0]
File "/usr/lib/python2.7/dist-packages/mapscript.py", line 539, in setattr = lambda self, name, value: _swig_setattr(self, styleObj, name, value)
File "/usr/lib/python2.7/dist-packages/mapscript.py", line 49, in _swig_setattr
return _swig_setattr_nondynamic(self,class_type,name,value,0)
File "/usr/lib/python2.7/dist-packages/mapscript.py", line 42, in _swig_setattr_nondynamic
if method: return method(self,value)
TypeError: in method 'styleObj_pattern_set', argument 2 of type 'double [MS_MAXPATTERNLENGTH]'
PATTERN
0.00 103009734106140943985641494373501206230179702584902942964236102170001354319245005187375454749201540084120924883519115137443744715539126962043151378461007560169620342613506541918802818544130417943354682889457077318721786538368063230294953392928194560.00
END # PATTERN
If I try the
new_style.pattern_setpattern = [2.0,2.0,0,0,0,0,0,0,0,0]
In a loop to generate several styles, I have the first as reported and the next as this
PATTERN
0.00 0.00
END # PATTERN
PATTERN
0.00 0.00
END # PATTERN
styleObj
The text was updated successfully, but these errors were encountered:
I try
new_style = mapscript.styleObj()
si = testmap.getLayer(li).getClass(ci).insertStyle(new_style)
new_style.patternlength = 2
new_style.pattern = [2.0,2.0,0,0,0,0,0,0,0,0]
But it return an error:
new_style.pattern = [2.0,2.0,0,0,0,0,0,0,0,0]
File "/usr/lib/python2.7/dist-packages/mapscript.py", line 539, in
setattr = lambda self, name, value: _swig_setattr(self, styleObj, name, value)
File "/usr/lib/python2.7/dist-packages/mapscript.py", line 49, in _swig_setattr
return _swig_setattr_nondynamic(self,class_type,name,value,0)
File "/usr/lib/python2.7/dist-packages/mapscript.py", line 42, in _swig_setattr_nondynamic
if method: return method(self,value)
TypeError: in method 'styleObj_pattern_set', argument 2 of type 'double [MS_MAXPATTERNLENGTH]'
Instead if I try this other:
new_style.pattern_setpattern = [2.0,2.0,0,0,0,0,0,0,0,0]
I have no error but the results are wrong.
If I try the
new_style.pattern_setpattern = [2.0,2.0,0,0,0,0,0,0,0,0]
In a loop to generate several styles, I have the first as reported and the next as this
styleObj
The text was updated successfully, but these errors were encountered: