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

Adding new countries to Map view #3671

Closed
polprog opened this issue Oct 14, 2017 · 3 comments
Closed

Adding new countries to Map view #3671

polprog opened this issue Oct 14, 2017 · 3 comments

Comments

@polprog
Copy link

polprog commented Oct 14, 2017

I'm having problems with adding new countries to the map view in Superset.

I am running superset version 0.19.1 (rather fresh install, never upgraded from an existing older version), python 3.5.3 and debian 9.2

Following the instructions in the documentation, I:

  • Took the shapefiles for Poland from the website specified in step 1
  • Have converted the shapefile to poland.geojson and placed it in superset/static/assets/visualizations/countries/

To verify, it contains polygons that are defined as:

{"type":"FeatureCollection","crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:OGC:1.3:CRS84"}},"features":[
{"type":"Feature","geometry":{"type":"Polygon","coordinates":[[[20.432125091552734,51.289997100830135],  and so on and so on ,[20.432125091552734,51.289997100830135]]]},"properties":{"ID_0":79,"ISO":"PL-01","NAME_0":"Poland","ID_1":1,"NAME_1":"somevoivodeship","ID_2":1,"NAME_2":"Bas-Rhin","TYPE_2":"wojewodztwo","ENGTYPE_2":"Department","NL_NAME_2":null,"VARNAME_2":"Unterelsaá"}},
}}

I have verified this syntax with geojson syntax from france.geojson, and it works perfectly when uploaded to mapshaper.org, so I'm sure that it is not a problem with the syntax of the geojson file.

Then, I found the controls.jsx file (it was located in another directory, /usr/local/lib/python3.5/dist-packages/superset/static/assets/javascripts/explore/stores/controls.jsx instead - found it with find shell command and it's the only controls.jsx in the whole install) and added a correpsonding entry there (as specified in step 7).

Still, I cannot see the new country in the dropdown list.

What am I doing wrong?

@xrmx
Copy link
Contributor

xrmx commented Oct 14, 2017

You shouldn't change the installed package, you have to add the changes to the source code, rebuild the package and then install it again to check if it works.

@mistercrunch
Copy link
Member

Notice: this issue has been closed because it has been inactive for 190 days. Feel free to comment and request for this issue to be reopened.

@sohelsarder
Copy link

Bit elaborated solution of this issue in following link
https://stackoverflow.com/questions/50045966/add-a-new-map-to-apache-superset/51035333#51035333

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

4 participants