コード例 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="GeoJsonMultiPoint{TCoordinates}"/> class.
        /// </summary>
        /// <param name="args">The additional args.</param>
        /// <param name="coordinates">The coordinates.</param>
        /// <exception cref="System.ArgumentNullException">coordinates</exception>
        public GeoJsonMultiPoint(GeoJsonObjectArgs <TCoordinates> args, GeoJsonMultiPointCoordinates <TCoordinates> coordinates)
            : base(args)
        {
            if (coordinates == null)
            {
                throw new ArgumentNullException("coordinates");
            }

            _coordinates = coordinates;
        }
コード例 #2
0
 // constructors
 /// <summary>
 /// Initializes a new instance of the <see cref="GeoJsonMultiPoint{TCoordinates}"/> class.
 /// </summary>
 /// <param name="coordinates">The coordinates.</param>
 public GeoJsonMultiPoint(GeoJsonMultiPointCoordinates <TCoordinates> coordinates)
     : this(null, coordinates)
 {
 }
コード例 #3
0
ファイル: GeoJson.cs プロジェクト: LJM74520/nice
        /// <summary>
        /// Creates a GeoJson MultiPoint object.
        /// </summary>
        /// <typeparam name="TCoordinates">The type of the coordinates.</typeparam>
        /// <param name="positions">The positions.</param>
        /// <returns>A GeoJson MultiPoint object.</returns>
        public static GeoJsonMultiPoint <TCoordinates> MultiPoint <TCoordinates>(params TCoordinates[] positions) where TCoordinates : GeoJsonCoordinates
        {
            var coordinates = new GeoJsonMultiPointCoordinates <TCoordinates>(positions);

            return(new GeoJsonMultiPoint <TCoordinates>(coordinates));
        }