polyline and polygon markers

Jun 16, 2010 at 10:41 AM
Thank you for the great work! It’s very useful control. But I have some problems, can you help me. I use WPF version, and I have to render on the map polyline-markers and polygon-markers. To show polyline I use this code: GMapMarker mRoute = new GMapMarker(r.pointsList[0]); mRoute.Route.AddRange(r.pointsList); mRoute.ZIndex = 5; mRoute.Tag = r.Name; mRoute.RegenerateRouteShape(mainMap.map); routeMap.Markers.Add(mRoute); and when I try to render more than one marker, stroke has disappeared. To show polygon I use this method (it’s modified method public Path CreateRoutePath(List<System.Windows.Point> localPath) I only add Fill to stroke) public Path CreateZonePath(List<System.Windows.Point> localPath) { // Create a StreamGeometry to use to specify myPath. StreamGeometry geometry = new StreamGeometry(); using (StreamGeometryContext ctx = geometry.Open()) { ctx.BeginFigure(localPath[0], true, true); // Draw a line to the next specified point. ctx.PolyLineTo(localPath, true, true); } // Freeze the geometry (make it unmodifiable) // for additional performance benefits. geometry.Freeze(); // Create a path to draw a geometry with. Path myPath = new Path(); { // Specify the shape of the Path using the StreamGeometry. myPath.Data = geometry; BlurEffect ef = new BlurEffect(); { ef.KernelType = KernelType.Gaussian; ef.Radius = 3.0; ef.RenderingBias = RenderingBias.Quality; } myPath.Effect = ef; myPath.Fill = Brushes.DarkOrange; myPath.Stroke = Brushes.Orange; myPath.StrokeThickness = 5; myPath.StrokeLineJoin = PenLineJoin.Round; myPath.StrokeStartLineCap = PenLineCap.Triangle; myPath.StrokeEndLineCap = PenLineCap.Square; myPath.Opacity = 0.6; } return myPath; } and here I have same problem: the filling has disappeared (when I change map zoom)
Jun 17, 2010 at 6:46 PM
Edited Jun 17, 2010 at 7:11 PM

check, newest version, it preserve Path's data

p.s. actually now i've included polygon generation, just like route

Jun 18, 2010 at 5:16 PM

Thanks I will check it. Polygon generation is the thing that i've looked for.