/// <summary> /// Initializes a new instance of the <see cref="GeoJsonLineString{TCoordinates}"/> class. /// </summary> /// <param name="args">The additional args.</param> /// <param name="coordinates">The coordinates.</param> /// <exception cref="System.ArgumentNullException">coordinates</exception> public GeoJsonLineString(GeoJsonObjectArgs <TCoordinates> args, GeoJsonLineStringCoordinates <TCoordinates> coordinates) : base(args) { if (coordinates == null) { throw new ArgumentNullException("coordinates"); } _coordinates = coordinates; }
// constructors /// <summary> /// Initializes a new instance of the <see cref="GeoJsonLineString{TCoordinates}"/> class. /// </summary> /// <param name="coordinates">The coordinates.</param> public GeoJsonLineString(GeoJsonLineStringCoordinates <TCoordinates> coordinates) : this(null, coordinates) { }
/// <summary> /// Creates a GeoJson LineString object. /// </summary> /// <typeparam name="TCoordinates">The type of the coordinates.</typeparam> /// <param name="positions">The positions.</param> /// <returns>A GeoJson LineString object.</returns> public static GeoJsonLineString <TCoordinates> LineString <TCoordinates>(params TCoordinates[] positions) where TCoordinates : GeoJsonCoordinates { var coordinates = new GeoJsonLineStringCoordinates <TCoordinates>(positions); return(new GeoJsonLineString <TCoordinates>(coordinates)); }