[mapserver-users] create hatch symbol with python mapscript?
thomas bonfort
thomas.bonfort at gmail.com
Thu Sep 1 08:54:49 PDT 2011
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20110901/b71b73f1/attachment.htm>
More information about the MapServer-users
mailing list