[mapserver-users] create hatch symbol with python mapscript?

Michael Schulz mandschulz at googlemail.com
Fri Sep 2 02:54:08 EDT 2011


Thanks Thomas,

that did the trick. Cheers, Michael


2011/9/1 thomas bonfort <thomas.bonfort at gmail.com>:
> You should also set the style size which is the spacing between hatches. It
> should be larger than the style width.
> Thomas
>
> Le 1 sept. 2011 17:11, "Michael Schulz" <mandschulz at googlemail.com> a
> écrit :
>> Hi,
>>
>> I just tried to create a hatch type symbol only thru python mapscript,
>> but failed. Could someone have a quick look and discover what I might
>> be missing?
>>
>> ...
>> hatch = mapscript.symbolObj("hatch")
>> hatch.type = mapscript.MS_SYMBOL_HATCH
>> sindex = m.symbolset.appendSymbol(hatch)
>> stylePoly.symbol = sindex
>> stylePoly.width = 5
>> stylePoly.angle = 45
>> stylePoly.outlinecolor.setRGB(255,0,0)
>> stylePoly.color.setRGB(0,255,0)
>> lp.opacity = 50
>> ...
>>
>> The layer is drawn with a complete fill at 50% opacity in green, but
>> no hatching.
>>
>> Thanks, Michael
>>
>> --
>> -----------------------------------------------------------
>> Michael Schulz
>> _______________________________________________
>> mapserver-users mailing list
>> mapserver-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>



-- 
-----------------------------------------------------------
Michael Schulz

Christoph-Mang-Str. 5
D-79100 Freiburg


More information about the mapserver-users mailing list