This project is read-only.


Linestrings are automatically closed.


in method CreatePathFigure in class GeometryExtensions in Project Mapsui.Rendering.XamlRendering

pathFigure.IsClosed is set always to true

private static XamlMedia.PathFigure CreatePathFigure(LineString linearRing)
        var pathFigure = new XamlMedia.PathFigure();
        pathFigure.IsClosed = true;

        bool first = true;

        foreach (var point in linearRing.Vertices)
            if (first)
                pathFigure.StartPoint = point.ToXaml();
                first = false;
                pathFigure.Segments.Add(new XamlMedia.LineSegment { Point = point.ToXaml() });
        return pathFigure;

chage this line

pathFigure.IsClosed = true;

for this

pathFigure.IsClosed = linearRing.IsClosed;
Closed Apr 21, 2014 at 9:31 PM by pauldendulk
fixed in ref 270


pauldendulk wrote Apr 12, 2013 at 3:43 PM

Thanks for reporting. That looks like the riight solution. This issue showed up when rendering lines?

Akrog wrote Apr 15, 2013 at 8:17 AM

yes, rendering linestrings always the last point is joined with the first, like in linearings