OK, after a few days researching finally i solved my own question, and i'm going to share it for others!
First of all, sharpmap doesn't have a built in functionality to show the direction of streets, so we have to style the roads!
for drawing a small arrow on the roads you should use LineSymbolizer of vactor Style.
below is the code i have written to do this:
VectorStyle style = new VectorStyle();
var cls = new SharpMap.Rendering.Symbolizer.CachedLineSymbolizer();
//styling the road
cls.LineSymbolizeHandlers.Add(new SharpMap.Rendering.Symbolizer.PlainLineSymbolizeHandler { Line = new System.Drawing.Pen(Color.Gold, 3) });
//drawing the arrow
var wls = new SharpMap.Rendering.Symbolizer.WarpedLineSymbolizeHander
{
Pattern = getArrowedLine(),
Line = new System.Drawing.Pen(System.Drawing.Color.Gray, 2),
Interval = 70
};
cls.LineSymbolizeHandlers.Add(wls);
cls.ImmediateMode = true;
style.LineSymbolizer = cls;
and the getArrowdLine function:
private GraphicsPath getArrowedLine()
{
//creating the Arrow graphics like this ->
var gp = new GraphicsPath();
gp.AddLine(5, 2, 7, 0); // \
gp.AddLine(0, 0, 7, 0); // -----
gp.AddLine(5, -2, 7, 0);// /
//if you dont close the figure you will have continuesly arrows like this ->->->->->
//but if you close it, depend on interval you will have -> -> ->
gp.CloseFigure();
return gp;
}
I am surprised why sharpmap did not implement ArrowedLine (which is commonly used in maps) in their WarpedLineSymbolizer class!!!