예제 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="GeoJsonFeature{TCoordinates}"/> class.
        /// </summary>
        /// <param name="args">The additional args.</param>
        /// <param name="geometry">The geometry.</param>
        public GeoJsonFeature(GeoJsonFeatureArgs <TCoordinates> args, GeoJsonGeometry <TCoordinates> geometry)
            : base(args)
        {
            _geometry = geometry;

            if (args != null)
            {
                _id         = args.Id;
                _properties = args.Properties;
            }
        }
예제 #2
0
파일: GeoJson.cs 프로젝트: LJM74520/nice
 /// <summary>
 /// Creates a GeoJson Feature object.
 /// </summary>
 /// <typeparam name="TCoordinates">The type of the coordinates.</typeparam>
 /// <param name="args">The additional args.</param>
 /// <param name="geometry">The geometry.</param>
 /// <returns>A GeoJson Feature object.</returns>
 public static GeoJsonFeature <TCoordinates> Feature <TCoordinates>(GeoJsonFeatureArgs <TCoordinates> args, GeoJsonGeometry <TCoordinates> geometry) where TCoordinates : GeoJsonCoordinates
 {
     return(new GeoJsonFeature <TCoordinates>(args, geometry));
 }