GeoJsonFeature Class
Definition
Represents a parsed GeoJSON feature with its identifier and polygon paths.
public class GeoJsonFeature
Constructors
| Name | Description |
|---|---|
| GeoJsonFeature (2 overloads) | No summary available. |
GeoJsonFeature overloads
GeoJsonFeature Constructor
public GeoJsonFeature(string id, System.Collections.Generic.List<System.Collections.Generic.List<Avalonia.Point>> paths, System.Collections.Generic.Dictionary<string, object> properties)
Parameters
id string
paths System.Collections.Generic.List<System.Collections.Generic.List<Avalonia.Point>>
properties System.Collections.Generic.Dictionary<string, object>
GeoJsonFeature Constructor
public GeoJsonFeature(string id, System.Collections.Generic.List<System.Collections.Generic.List<System.Collections.Generic.List<Avalonia.Point>>> polygons, System.Collections.Generic.Dictionary<string, object> properties)
Parameters
id string
polygons System.Collections.Generic.List<System.Collections.Generic.List<System.Collections.Generic.List<Avalonia.Point>>>
properties System.Collections.Generic.Dictionary<string, object>
Methods
| Name | Description |
|---|---|
| Contains | Determines whether the viewport point is inside the feature's GeoJSON polygons. |
Contains Method
Determines whether the viewport point is inside the feature's GeoJSON polygons.
public bool Contains(Avalonia.Point point)
Parameters
point Avalonia.Point
Returns
bool
Properties
| Name | Description |
|---|---|
| Bounds | Gets the bounding box of the feature in viewport coordinates (0-200, 0-100). |
| Centroid | Gets the pre-calculated centroid of the feature (normalized to 0-200 x 0-100 viewport). |
| Geometry | Gets the pre-calculated geometry for this feature (normalized to 0-200 x 0-100 viewport). |
| Id | Gets the unique identifier of the feature. |
| Paths | Gets the list of polygon paths defining the feature shape. |
| Properties | Gets the collection of properties from GeoJSON. |
Bounds Property
Gets the bounding box of the feature in viewport coordinates (0-200, 0-100).
public Avalonia.Rect Bounds { get; set; }
Centroid Property
Gets the pre-calculated centroid of the feature (normalized to 0-200 x 0-100 viewport).
public Avalonia.Point Centroid { get; set; }
Geometry Property
Gets the pre-calculated geometry for this feature (normalized to 0-200 x 0-100 viewport).
public Avalonia.Media.Geometry Geometry { get; set; }
Id Property
Gets the unique identifier of the feature.
public string Id { get; set; }
Paths Property
Gets the list of polygon paths defining the feature shape.
public System.Collections.Generic.List<System.Collections.Generic.List<Avalonia.Point>> Paths { get; set; }
Properties Property
Gets the collection of properties from GeoJSON.
public System.Collections.Generic.Dictionary<string, object> Properties { get; set; }