Adding new countries to Map view
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.geojsonand placed it insuperset/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?
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.
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.
Bit elaborated solution of this issue in following link https://stackoverflow.com/questions/50045966/add-a-new-map-to-apache-superset/51035333#51035333