question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot add new country to CountryMap chart

See original GitHub issue

I was trying add new country following to https://superset.apache.org/visualization.html#need-to-add-a-new-country, however it doesn’t work - new country is visable in dropdown, but when I click on it, map is blank.

Expected results

Can display new added map from .geojson

Actual results

image

I get 404 when I click new country on dropdown map is fetching:

Request URL: http://localhost:5000/superset/explore/undefined
Status Code: 404 NOT FOUND

Other (default) maps works properly:

Request URL: http://localhost:5000/static/assets/dist/5f64d14062abb5f5fd6610972976ebe6.geojson
Status Code: 200 OK

I was able to resolve this issue by editing assets/node_modules/@superset-ui/legacy-plugin-chart-country-map/countries.js and add .geojson file to this directory. So it means that maps are fetched from npm package?

How to reproduce the bug

https://superset.apache.org/visualization.html#need-to-add-a-new-country

Environment

  • superset version: 0.999.0dev
  • python version: Python 3.7.5
  • node.js version: v12.12.0
  • npm version: 6.11.3

I built superset from source.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
issue-label-bot[bot]commented, Dec 12, 2019

Issue-Label Bot is automatically applying the label #bug to this issue, with a confidence of 0.92. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

1reaction
czuecommented, Aug 17, 2020

I just submitted a PR to update the docs for this: https://github.com/apache/incubator-superset/pull/10621 based on this comment and successfully going through the process. Hopefully it will be merged and save others the trouble that I’ve had to go through to get this working!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot add new country to CountryMap chart #8819 - GitHub
I was trying add new country following to https://superset.apache.org/visualization.html#need-to-add-a-new-country, however it doesn't work ...
Read more >
Tutorial - MapChart
The official Tutorial page for creating maps on MapChart. ... Paint the countries/states you want with the selected color by clicking on them....
Read more >
Map Chart: Regions not displaying properly
In general, Map Charts is quite sensitive to column's names. Try to use Province instead of State; County instead of District; etc. Sometimes...
Read more >
How to change your Google Play country
If you move to a new country you may want to change your Google Play country. ... creating a payments profile before you...
Read more >
DataBank | The World Bank
Option 5: Click on Add Country in the Preview panel of the Report page. This will open a new ... You can view...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found