/// <summary> /// Renders a LineString to the map. /// </summary> /// <param name="g">Graphics reference</param> /// <param name="line">LineString to render</param> /// <param name="pen">Pen style used for rendering</param> /// <param name="map">Map reference</param> public static void DrawLineString(System.Drawing.Graphics g, Geometries.LineString line, System.Drawing.Pen pen, SharpMap.Map map) { if (line.Vertices.Count > 1) { System.Drawing.Drawing2D.GraphicsPath gp = new System.Drawing.Drawing2D.GraphicsPath(); gp.AddLines(line.TransformToImage(map)); g.DrawPath(pen, gp); } }