Exemple #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;
            }
        }
Exemple #2
0
 /// <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));
 }
Exemple #3
0
 // constructors
 /// <summary>
 /// Initializes a new instance of the <see cref="GeoJsonFeature{TCoordinates}"/> class.
 /// </summary>
 /// <param name="geometry">The geometry.</param>
 public GeoJsonFeature(GeoJsonGeometry <TCoordinates> geometry)
     : this(null, geometry)
 {
 }