This project has moved. For the latest updates, please go here.

Use LineSymbolizer in CustomTheme

Topics: SharpMap v0.9 / v1.x, WinForms Controls
Oct 14, 2015 at 5:35 AM
Hi Team,
Can we use LineSymbolizer in Custom theme?
Basically i want to use lineSymbolizer with some styling.?If there is any way please share some code.

Oct 14, 2015 at 7:02 AM
Could you elaborate a bit more?
Maybe you can derive a LineSymbolizer layer that adjusts the symbolizer according to the feature data?
Oct 14, 2015 at 7:34 AM
For Eg.:-
I add a VectorLayer and set LineSymbolizer Like this at the time of Layer Creation.
cls.LineSymbolizeHandlers.Add(new SharpMap.Rendering.Symbolizer.PlainLineSymbolizeHandler { Line = new System.Drawing.Pen(mpLayer.LineColor, (float)mpLayer.LineWidth) });
            if (mpLayer.LineStyle != LineStyle.Plain)
                var wls = new SharpMap.Rendering.Symbolizer.WarpedLineSymbolizeHander
                    Pattern = LineSymbolizer.GetTriangleSeries(5F, 5F),
                    Line = new System.Drawing.Pen(mpLayer.LineColor, (float)mpLayer.LineWidth),
                    Interval = mpLayer.Interval
            Vlay.Style.LineSymbolizer = cls;
then i need to add some custom theme may be change in color on event of user change the color which i want to write some code in CustomTheme Function.
but when i use LineSymbolizer as a Style in Vector Layer then no custom theme will be applied on that Layer.

I need to add both LineSymbolizer and Custom Theme Delegate to my Layer together.