GMap.NET route route multicolor

I would like to draw a route using the GMap.Net routing method. But when I added any point to the list of routes with a new color, the color of the entire route was changed. Thus, he can only use one color for the route. Is there a way to use two or more colors in a route?

+3


source to share


2 answers


You can do it like this:



route.Stroke= (Pen)route.Stroke.Clone();
route.Stroke.Color = Color.Orange;

      

+2


source


When adding a new route to the list, create a brush object and assign it to the route.stroke method as follows



Brush = new System.Drawing.SolidBrush (Color.FromArgb (80, Color.Blue)) r.Stroke = New Pen (Brush, 10)

0


source







All Articles