kadoshms / react-jvectormap

A react wrapper for jvectormap maps
MIT License
98 stars 70 forks source link

Country code errors on WorldMill map #120

Closed Panda64 closed 2 years ago

Panda64 commented 2 years ago

I noticed that some country codes are wrong for the WorldMill map, specifically the countries that have a different label name to those in the WorldMerc map.

For example, on line 629 of https://github.com/kadoshms/react-jvectormap/blob/master/packages/maps/World/worldMill.json :

"94c": { "path": Deleted for readability, "name": "United States of America" },

This is in contrast to the data in https://github.com/kadoshms/react-jvectormap/blob/master/packages/maps/World/worldMerc.json (line 569):

"US": { "path": Deleted for readability, "name": "United States" },

94c does not appear to be a valid country code. This is causing me problems when the country code is returned on callbacks from onRegionClick and so on, forcing me to use the WorldMerc map instead. This same issue is also present in other countries, like Laos (96a), South Korea (8ac), North Korea (8c0), and probably more.

What is the significance of this string? Is there any way extract the standard country code?

kadoshms commented 2 years ago

Thanks for reporting this! I fixed the country codes, and published it.

@react-jvectormap/world@1.1.0