Exemple #1
0
        /// <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;
        }
Exemple #2
0
 // 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)
 {
 }
Exemple #3
0
        /// <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));
        }