Example #1
0
        public MapPolyline GetAirPath()
        {
            MapPolyline polyline = new MapPolyline()
            {
                Points = trajectoryField.GetAirPath(), IsGeodesic = true
            };

            trajectoryField.UpdateTrajectory(polyline.ActualPoints.ToList(), SpeedKmH);
            return(polyline);
        }
        public List <MapItem> GetAirPath(DataTemplate airportTemplate)
        {
            List <MapItem> mapItemList = new List <MapItem>();
            MapPolyline    polyline    = new MapPolyline()
            {
                Points = trajectoryField.GetAirPath(), Fill = new SolidColorBrush(Colors.Transparent), Stroke = new SolidColorBrush(Color.FromArgb(127, 255, 0, 199)), StrokeStyle = new StrokeStyle()
                {
                    Thickness = 4
                }, IsGeodesic = true, Tag = this
            };

            trajectoryField.UpdateTrajectory(polyline.ActualPoints.ToList(), SpeedKmH);
            mapItemList.Add(polyline);
            mapItemList.Add(new MapCustomElement()
            {
                Location = trajectoryField.StartPoint, ContentTemplate = airportTemplate, Tag = this
            });
            mapItemList.Add(new MapCustomElement()
            {
                Location = trajectoryField.EndPoint, ContentTemplate = airportTemplate, Tag = this
            });
            return(mapItemList);
        }