I have seen at stackexchange some answers with C++ but I need the answer at C#, please.
I must use a loop to add several MapPolylines to a map. If I don't declare a new one the last MapPolyLine is the only one that is shown.
for (int i = 0; i< collections.Count(); i++)
{
// PseudoCode (Locs is a LocationCollection)
MapPolyline mapl(+i) = new MapPolyline();
mapl(+i).Stroke = new System.Windows.Media.SolidColorBrush(System.Windows.Media.Colors.Orange);
mapl(+i).StrokeThickness = 2;
mapl(+i).Opacity = 0.8;
mapl(+i).Locations = locs;
mymap.Children.Add(mapl+i);
}
Thanks