I want to add independent and different RouteWays by using "List " from a list with different PushPins with different colors at WPF C#.I added a piece of code and an image what ı want to do. Thanks in advance.
void InitializeRoutes() {
List<RouteWaypoint> waypoints1 = new List<RouteWaypoint>();
waypoints1.Add(new RouteWaypoint("Los Angeles", new GeoPoint(33.87, -118.4)));
waypoints1.Add(new RouteWaypoint("San Francisco", new GeoPoint(37.62, -122.45)));
routes.Add(new Route(ItemsLayer, waypoints1, new MapItemStyle() { Stroke = Color.Red, StrokeWidth = 3 }, Image.FromFile("..\\..\\Pushpin1.png")));
List<RouteWaypoint> waypoints2 = new List<RouteWaypoint>();
waypoints2.Add(new RouteWaypoint("San Diego", new GeoPoint(32.72, -117.15)));
waypoints2.Add(new RouteWaypoint("Phoenix", new GeoPoint(33.54, -112.2)));
waypoints2.Add(new RouteWaypoint("Las Vegas", new GeoPoint(36.17, -115.16)));
routes.Add(new Route(ItemsLayer, waypoints2, new MapItemStyle() { Stroke = Color.Aquamarine, StrokeWidth = 3 }, Image.FromFile("..\\..\\Pushpin2.png")));
}
What I have tried:
I can do that with webform but i cant do with wpf.