Mapbox data visualization doesn't work
Mapbox data visualization type doesn't show anything while it seems everything is okay!
Expected results
Mapbox map!
Actual results
Nothing
Screenshots

How to reproduce the bug
- Go to SQL Lab and write a query include latitude and longitude.
- Click on the 'explore' button
- choose the 'mapbox' as Visualization Type (also set latitude and longitude in query section)
- Click on the 'run query' button
- See nothing! (i mean the error)
Environment
latest official docker image
Checklist
Make sure these boxes are checked before submitting your issue - thank you!
- [ ] I have checked the superset logs for python stacktraces and included it here as text if there are any.
- [ ] I have reproduced the issue with at least the latest released version of superset.
- [ ] I have checked the issue tracker for the same issue and I haven't found one similar.
Additional context
Add any other context about the problem
Have you added your Mapbox API Key?
Of course yes!
You should save this .then into it.I guess it's a bug
it doesn't work
Confirmed, I noticed it's broken too
Hi everyone,
Is it still broken in master or had been fixed?
Update: Confirm - Mapbox works - Point Radius - Auto.
Hi everyone, I have setup API_Key on config file, but still not able to use mapbox in superset. sometimes getting error "An error occurred while rendering the visualization: TypeError: Cannot read property 'map' of undefined" and sometimes "An error occurred while rendering the visualization: TypeError: e.filter is not a function" I am very confused why getting two different errors? Any help is much appreciated. Thanks
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.
In the docker-compose.yml file, environment block, you should add the Mapbox environment variable MAPBOX_API_KEY: {your_mapbox_api_token}. Once I included this I was able to see the maps when using a deck.gl visualization. I tested loading the deck.gl examples provided when the flag SUPERSET_LOAD_EXAMPLES is enabled.
If you check the config.py file, the token is obtained from the environment.
Another option could be to add the variable in the Dockerfile. However, this option will require you to specify the variable at build time, which means if you decide to use a different token you will have to rebuild the image.
Hi, when i try to use mapbox with latitud and longitud from a datasource for example CSV file or a database like postgres, i can fine the map when i create the chat. However, when i try to to get data with latitud and longitud from SQL lab, i get this error when i use the mapbox chart:
Traceback (most recent call last):
File "/home/edgarubuntustudio/venv/lib/python3.6/site-packages/superset/views/base.py", line 120, in wraps
return f(self, *args, **kwargs)
File "/home/edgarubuntustudio/venv/lib/python3.6/site-packages/superset/utils/decorators.py", line 69, in wrapper
return f(*args, **kwargs)
File "/home/edgarubuntustudio/venv/lib/python3.6/site-packages/superset/views/core.py", line 1092, in explore_json
viz_obj, csv=csv, query=query, results=results, samples=samples
File "/home/edgarubuntustudio/venv/lib/python3.6/site-packages/superset/views/core.py", line 1013, in generate_json
payload = viz_obj.get_payload()
File "/home/edgarubuntustudio/venv/lib/python3.6/site-packages/superset/viz.py", line 381, in get_payload
payload["data"] = self.get_data(df)
File "/home/edgarubuntustudio/venv/lib/python3.6/site-packages/superset/viz.py", line 2059, in get_data
point_radius_col,
File "/home/edgarubuntustudio/venv/lib/python3.6/site-packages/superset/viz.py", line 2055, in
Y try to cast the latitud and longitud in the SQl in SQL Lab of this ways, but i get the same error: 1. to_number(lat, '###,######') lat, to_number(lng, '###,######') lng, 2. cast(lat as decimal(28,6) ) lat, cast(lng as decimal(28,6) ) lng,
3. 5 lat, 5 lng
Does anyone know how I can correct this?
Regards,