Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tonga Country is not visible on the map (react-simple-map) #351

Open
AnkitSingh-47 opened this issue Dec 14, 2023 · 0 comments
Open

Tonga Country is not visible on the map (react-simple-map) #351

AnkitSingh-47 opened this issue Dec 14, 2023 · 0 comments

Comments

@AnkitSingh-47
Copy link

Inside my country map json, I want to add TongaCountry with arcs,

I've added the country but - it is throwing the error.

Please add Tonga Country in the topo json file (which I've attached) or share the latest topo json file which contains all the countries.
CountryMapJson.json

"react-simple-maps": "^3.0.0",

<Geographies geography={CountryMapJson}> {({ geographies }) => geographies.map(geo => { const currentData = data.find(item => item.country?.toLowerCase() === geo.properties.NAME.toLowerCase()) || []; let colorCode = currentData.mainKeyForValue ?? "#C8CBCB"; return ( <Geography key={geo.rsmKey} geography={geo} fill={colorCode} style={{ hover: { fill: "#3c86ad", outline: "none" }, pressed: { fill: "#608ea5", outline: "none" } }} onMouseEnter={() => { const { NAME} = geo.properties; this.setTooltip(NAME, currentData['value'], geo.rsmKey, currentData["shipments"], currentData["numberOfCompanies"]); }} onMouseLeave={() => { this.setState({ key: '' }) }} /> ); })} </Geographies>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant