# ChartMapRegion

Describes one drawable region inside a map definition.

 Struct  

`ChartForgeX.Core`

**Namespace**

`ChartForgeX.Core`

**Assembly**

`ChartForgeX`

**Source**

[ChartMapRegion.cs:58](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/ChartMapRegion.cs#L58)

**Base**

`ValueType`

**Modifiers**

sealed

Describes one drawable region inside a map definition.

## Inheritance

- ValueType
- ChartMapRegion

## Usage

 Explore 3 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.

### Returned or exposed by 2

- Property [ChartMapDefinition.Regions](/api/chartforgex-core-chartmapdefinition/#property-regions)
- Method [ChartMapRegion.WithFeature](/api/chartforgex-core-chartmapregion/#method-withfeature-chartforgex-core-chartmapfeature)

### Accepted by parameters 1

- Constructor [ChartMapDefinition.ChartMapDefinition](/api/chartforgex-core-chartmapdefinition/#constructor-ctor-string-string-double-double-collections-generic-ienumerable-chartforgex-core-chartmapregion) parameter `regions`

 Filter members   

    Show inherited   

 

## Constructors

 `public ChartMapRegion(string code, string name, string path, ChartPoint? label = null, IEnumerable<string>? aliases = null)` [#](#constructor-ctor-string-string-string-nullable-chartforgex-primitives-chartpoint-collections-generic-ienumerable-system-string) 

[ChartMapRegion.cs:58](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/ChartMapRegion.cs#L58)

Initializes a new instance of the [ChartMapRegion](/api/chartforgex-core-chartmapregion/) struct.

Parameters

**code string required**

The canonical region code.

**name string required**

The display name for the region.

**path string required**

The SVG path data for the region.

**label ChartForgeX.Primitives.ChartPoint? = null optional**

An optional preferred label point.

**aliases System.Collections.Generic.IEnumerable<string>? = null optional**

Optional alternate codes or names.

## Methods

 `public ChartMapRegion WithFeature(ChartMapFeature? feature)` [#](#method-withfeature-chartforgex-core-chartmapfeature) 

[ChartMapRegion.cs:76](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/ChartMapRegion.cs#L76)

Returns the same region geometry with replacement immutable feature metadata. No observation ID is assigned.

Parameters

**feature ChartForgeX.Core.ChartMapFeature? required**

A snapshot, or null to clear it. Imported raw geometry is retained.

Returns

 `ChartMapRegion` An independent region with unchanged paths, code, name and aliases. 

## Inherited Methods

 `public override bool Equals(object? obj)` [#](#method-equals-object) 

Inherited from ValueType

Parameters

**obj object? required**

Returns

 `bool` 

 `public override int GetHashCode()` [#](#method-gethashcode) 

Inherited from ValueType

Returns

 `int` 

 `public Type GetType()` [#](#method-gettype) 

Inherited from object

Returns

 `Type` 

 `public override string? ToString()` [#](#method-tostring) 

Inherited from ValueType

Returns

 `string?` 

## Properties

 `public ChartMapFeature? Feature { get; }` [#](#property-feature) 

[ChartMapRegion.cs:39](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/ChartMapRegion.cs#L39)

Gets optional immutable source feature metadata, independent of region observation identity.

 `public string? GeoJsonGeometry { get; }` [#](#property-geojsongeometry) 

[ChartMapRegion.cs:42](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/ChartMapRegion.cs#L42)

Gets the immutable original imported geometry JSON of a seam-aware polygon, or null for ordinary/manual geometry.

 `public IReadOnlyList<string> Aliases { get; }` [#](#property-aliases) 

[ChartMapRegion.cs:47](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/ChartMapRegion.cs#L47)

Gets alternate codes or names that should resolve to this region.

## Fields

 `public readonly string Code` [#](#field-code) 

[ChartMapRegion.cs:16](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/ChartMapRegion.cs#L16)

Gets the canonical region code.

 `public readonly string Name` [#](#field-name) 

[ChartMapRegion.cs:21](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/ChartMapRegion.cs#L21)

Gets the display name for the region.

 `public readonly string Path` [#](#field-path) 

[ChartMapRegion.cs:26](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/ChartMapRegion.cs#L26)

Gets the SVG path data for the region in the definition coordinate space.

 `public readonly bool HasLabel` [#](#field-haslabel) 

[ChartMapRegion.cs:31](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/ChartMapRegion.cs#L31)

Gets a value indicating whether the region has a preferred label point.

 `public readonly ChartPoint Label` [#](#field-label) 

[ChartMapRegion.cs:36](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/ChartMapRegion.cs#L36)

Gets the preferred label point in the definition coordinate space.

<!-- PowerForge markdown artifact sha256:36F69F98C11E6FA3DAD7365C898F9B76BE8E8EF78A91CDF675DF601B0B2A410B -->
