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

Cannot add new country to CountryMap chart #8819

Closed
barmic12 opened this issue Dec 12, 2019 · 5 comments
Closed

Cannot add new country to CountryMap chart #8819

barmic12 opened this issue Dec 12, 2019 · 5 comments
Labels
!deprecated-label:bug Deprecated label - Use #bug instead inactive Inactive for >= 30 days

Comments

@barmic12
Copy link

barmic12 commented Dec 12, 2019

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-label-bot issue-label-bot bot added the !deprecated-label:bug Deprecated label - Use #bug instead label Dec 12, 2019
@issue-label-bot
Copy link

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.

@PeterCahn
Copy link

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?

I needed to add a map and this was the only working way that I found.

It would be possible to have a way to add a new map instead of building it from source? There is some workaround?

@stale
Copy link

stale bot commented Feb 14, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue .pinned to prevent stale bot from closing the issue.

@stale stale bot added the inactive Inactive for >= 30 days label Feb 14, 2020
@stale stale bot closed this as completed Feb 21, 2020
@Sandwichzhao
Copy link

hello, I want to get city of guangdong province,how can I do.Can you help me?
image

@czue
Copy link
Contributor

czue commented Aug 17, 2020

I just submitted a PR to update the docs for this: #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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
!deprecated-label:bug Deprecated label - Use #bug instead inactive Inactive for >= 30 days
Projects
None yet
Development

No branches or pull requests

4 participants