Skip to content
ChartForgeX
Class

ChartMapDefinition

ChartForgeX.Core

Namespace
ChartForgeX.Core
Assembly
ChartForgeX
Modifiers
sealed

Describes reusable map geometry that can be rendered with different map visual styles.

Inheritance

  • object
  • ChartMapDefinition

Usage

Explore 22 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Accepted by parameters 7

Constructors

ChartMapDefinition 2 overloads
public ChartMapDefinition(string id, string name, double width, double height, IEnumerable<ChartMapRegion> regions) #

Initializes a new instance of the ChartMapDefinition class with bounds starting at zero.

Parameters

id string required
The stable map identifier.
name string required
The display name.
width double required
The map coordinate width.
height double required
The map coordinate height.
regions System.Collections.Generic.IEnumerable<ChartForgeX.Core.ChartMapRegion> required
The drawable regions.
public ChartMapDefinition(string id, string name, ChartRect bounds, IEnumerable<ChartMapRegion> regions) #

Initializes a new instance of the ChartMapDefinition class.

Parameters

id string required
The stable map identifier.
name string required
The display name.
bounds ChartForgeX.Primitives.ChartRect required
The coordinate bounds occupied by the map paths.
regions System.Collections.Generic.IEnumerable<ChartForgeX.Core.ChartMapRegion> required
The drawable regions.

Methods

public static ChartMapDefinition FromGeoJson(string id, string name, string geoJson, ChartMapGeoJsonOptions? options = null) #

Creates a map definition from a GeoJSON FeatureCollection or Feature.

Parameters

id string required
The stable map identifier.
name string required
The display name.
geoJson string required
The GeoJSON document.
options ChartForgeX.Core.ChartMapGeoJsonOptions? = null optional
Optional import settings.

Returns

ChartMapDefinition A reusable map definition.
public bool TryResolveRegion(string region, out string code) #

Resolves a caller-provided region code or alias to the canonical region code.

Parameters

region string required
The code, name, or alias to resolve.
code string required
The canonical region code.

Returns

bool true when the region can be resolved; otherwise false.
public ChartMapDefinition WithGeographicProjection(ChartMapGeoJsonProjection projection) #

Returns an independent definition declaring the geographic projection already used by its paths.

Parameters

projection ChartForgeX.Core.ChartMapGeoJsonProjection required
The transform already applied to longitude/latitude positions. This declaration does not transform existing paths.

Returns

ChartMapDefinition A new immutable definition suitable for composition with geographic points, routes and equally projected geometry.
public ChartMapDefinition WithPolygonViewport(ChartMapViewport viewport) #

Returns a detached declaration of the antimeridian window already used to prepare the paths.

Parameters

viewport ChartForgeX.Core.ChartMapViewport required
A seam-crossing window matching the declared projection.

Returns

ChartMapDefinition An independent definition. This method declares existing source geometry; it does not transform or clip paths.

Properties

public string Id { get; } #

Gets the stable map identifier.

public string Name { get; } #

Gets the display name of the map.

public ChartRect Bounds { get; } #

Gets the coordinate bounds occupied by the map paths.

public ChartMapGeoJsonProjection? GeographicProjection { get; private set; } #

Gets the geographic projection already applied to the paths, or null for arbitrary source coordinates.

public ChartMapViewport? PolygonViewport { get; private set; } #

Gets the explicit antimeridian source-window declaration of already unwrapped polygon paths, or null for ordinary geometry.

public IReadOnlyList<ChartMapRegion> Regions { get; } #

Gets the drawable regions.