HtmlForgeX

API Reference

Class

CountryCentroids

Namespace HtmlForgeX
Assembly HtmlForgeX
Modifiers static

Country centroid lookup table (ISO2 -> lat/lon) backed by an embedded dataset. Uses Natural Earth public domain label points for reliable country-level markers.

Inheritance

  • Object
  • CountryCentroids

Methods

TryGet 2 overloads
public static Boolean TryGet(Country country, out GeoCoordinate coordinate) #
Returns: Boolean

Try to get a centroid by ISO2 code.

Parameters

iso2 System.String requiredposition: 0
coordinate HtmlForgeX.CountryCentroids.GeoCoordinate@ requiredposition: 1
TryGet(HtmlForgeX.Country country, HtmlForgeX.CountryCentroids.GeoCoordinate@ coordinate) #

Try to get a centroid by strongly-typed Country enum.

Parameters

country HtmlForgeX.Country required
coordinate HtmlForgeX.CountryCentroids.GeoCoordinate@ required
public static Boolean TryGetName(String iso2, out String name) #
Returns: Boolean

Try to get the English display name by ISO2 code.

Parameters

iso2 System.String requiredposition: 0
name System.String@ requiredposition: 1

Properties

public static IReadOnlyDictionary<String, GeoCoordinate> All { get; } #

Returns all available centroids keyed by ISO2.

public static IReadOnlyDictionary<String, String> Names { get; } #

Returns English display names keyed by ISO2 when available.