/// <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; } }
/// <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)); }