GMap.NET route multi-color

2.7k views Asked by At

I'd like to draw route using GMap.Net's route method. But, when I added any point into route list with new color, color of all route was changed. So, it seems to be able to use only one color for a route. Is there any way to use two or more colors in a route?

2

There are 2 answers

1
Agustín On

You can do it this way:

route.Stroke= (Pen)route.Stroke.Clone();
route.Stroke.Color = Color.Orange;
0
Mandar On

While adding new route to list create an object of brush and assign it to route.stroke method as follows

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