我有一堆 GeoCoordinate 对象,我希望将它们显示为折线(以显示一个人所走的路径)。
我不成功的尝试(不显示任何行):
var map = new Map(); // Nokia Maps
var layer = new MapLayer();
var overlay = new MapOverlay();
var polyline = new MapPolyline();
var gc = new GeoCoordinateCollection();
foreach(var geo in MyGeoCoordinateList) {
gc.Add(geo);
}
polyline.Path = gc;
polyline.StrokeColors = Colors.Red;
polyline.StrokeThickness = 3;
overlay.Content = polyline;
layer.Add(overlay);
map.Layers.Add(layer);
LayoutRoot.Children.Add(map);