I am trying to use MapPolyLine on my map to show the route in real time, I hope that it will move / scale this time . The fact is that the line is not displayed on the map, and I can not find the programming error:
FROM#
MapLayer pathLayer; //Constructor pathLayer = new MapLayer(); MapPolyline line = new MapPolyline(); line.StrokeColor = Colors.Red; line.StrokeThickness = 10; //line.Path.Add(several points); Tested, no effect MapOverlay overlay = new MapOverlay(); overlay.Content = line; //overlay.GeoCoordinate = new GeoCoordinate(0,0); Tested, no effect //overlay.PositionOrigin = new Point(0.0, 1.0); Tested, no effect pathLayer.Add(overlay); MyMap.Layers.Add(pathLayer); void geolocator_PositionChanged(Geolocator sender, PositionChangedEventArgs args) { MapPolyline line = pathLayer.First(TrackPath).Content as MapPolyline; line.Path.Add(args.Position.Coordinate); // Checked values, line.Path adds them correctly }
EDIT: New Information. The emulator shows an error when trying to add it using XAML, and the emulator shows the class name at the top of the map as a graphical failure:

MLProgrammer-CiM
source share