Show common country names and enlarge map marker hit area
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
31cef44bf3
commit
552abffd29
6 files changed
+88
-6
No files matched your search
@@ -0,0 +1,40 @@
|
||||
namespace Flypaper.Web.Components.Shared;
|
||||
|
||||
public static class CountryNames
|
||||
{
|
||||
private static readonly Dictionary<string, string> ShortNames = new(StringComparer.OrdinalIgnoreCase)
|
||||
{
|
||||
["BN"] = "Brunei",
|
||||
["BO"] = "Bolivien",
|
||||
["CD"] = "Kongo (Dem. Rep.)",
|
||||
["CG"] = "Kongo",
|
||||
["CI"] = "Elfenbeinküste",
|
||||
["CN"] = "China",
|
||||
["CY"] = "Zypern",
|
||||
["CZ"] = "Tschechien",
|
||||
["FM"] = "Mikronesien",
|
||||
["GB"] = "Vereinigtes Königreich",
|
||||
["HK"] = "Hongkong",
|
||||
["IR"] = "Iran",
|
||||
["KP"] = "Nordkorea",
|
||||
["KR"] = "Südkorea",
|
||||
["LA"] = "Laos",
|
||||
["MD"] = "Moldau",
|
||||
["MK"] = "Nordmazedonien",
|
||||
["MO"] = "Macau",
|
||||
["PS"] = "Palästina",
|
||||
["RU"] = "Russland",
|
||||
["SY"] = "Syrien",
|
||||
["SZ"] = "Eswatini",
|
||||
["TL"] = "Osttimor",
|
||||
["TW"] = "Taiwan",
|
||||
["TZ"] = "Tansania",
|
||||
["US"] = "USA",
|
||||
["VA"] = "Vatikanstadt",
|
||||
["VE"] = "Venezuela",
|
||||
["VN"] = "Vietnam"
|
||||
};
|
||||
|
||||
public static string? Display(string? code, string? name) =>
|
||||
code is not null && ShortNames.TryGetValue(code, out var shortName) ? shortName : name ?? code;
|
||||
}
|
||||
Reference in new issue
Block a user