hello,
we are working on loading a route file externally the code for the following is given below.
List t = new List();
foreach (var item in RouteLoader.Routes)
{
foreach (var point in item.Points)
{
var a = point.Latitude;
var b = point.Longitude;
Vertex v = new Vertex(b, a);
t.Add(v);
}
}
LineShape lineShape = new LineShape(t);
testMap.TrackOverlay.TrackShapeLayer.Open();
testMap.TrackOverlay.TrackShapeLayer.EditTools.BeginTransaction();
testMap.TrackOverlay.TrackShapeLayer.EditTools.Add(new Feature(lineShape));
testMap.TrackOverlay.TrackShapeLayer.EditTools.CommitTransaction();
testMap.TrackOverlay.TrackShapeLayer.Close();
testMap.TrackOverlay.TrackShapeLayer.ZoomLevelSet.ZoomLevel01.DefaultLineStyle = LineStyles.CreateSimpleLineStyle(new GeoColor(51, 153, 255), 2, false);
testMap.TrackOverlay.TrackShapeLayer.WrappingExtent = testMap.Overlays["Diff0Overlay"].GetBoundingBox();
testMap.TrackOverlay.TrackShapeLayer.WrappingMode = WrappingMode.WrapDateline;
route loader is a list used for reading the data from file.
regards,
hrishikesh