1

Closed

Linestrings are automatically closed.

description

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;
            }
            else
            {
                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 8:31 PM by pauldendulk
fixed in ref 270

comments

pauldendulk wrote Apr 12, 2013 at 2:43 PM

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

Akrog wrote Apr 15, 2013 at 7:17 AM

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