public GpxViewerLineString( ILoadedGpxFileTourInfo tour, ILoadedGpxFileTourSegmentInfo segment, IEnumerable <Point> points) : base(points) { this.Tour = tour; this.Segment = segment; }
public static IGeometry?GpxWaypointsToMapsuiGeometry( this IEnumerable <GpxWaypoint> waypoints, ILoadedGpxFileTourInfo tour, ILoadedGpxFileTourSegmentInfo segment) { var linePoints = new List <Point>(); foreach (var actPoint in waypoints) { linePoints.Add(SphericalMercator.FromLonLat(actPoint.Longitude, actPoint.Latitude)); } if (linePoints.Count < 2) { return(null); } return(new GpxViewerLineString(tour, segment, linePoints)); }