Skip to content

Commit fb7bdd0

Browse files
committed
docs(maps): add map tiles setting 1
1 parent 1130e8b commit fb7bdd0

File tree

2 files changed

+55
-11
lines changed

2 files changed

+55
-11
lines changed

UPDATING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ There's a migration added that can potentially affect a significant number of ex
4747
- [30284](https://github.com/apache/superset/pull/30284) Deprecated GLOBAL_ASYNC_QUERIES_REDIS_CONFIG in favor of the new GLOBAL_ASYNC_QUERIES_CACHE_BACKEND configuration. To leverage Redis Sentinel, set CACHE_TYPE to RedisSentinelCache, or use RedisCache for standalone Redis
4848
- [31961](https://github.com/apache/superset/pull/31961) Upgraded React from version 16.13.1 to 17.0.2. If you are using custom frontend extensions or plugins, you may need to update them to be compatible with React 17.
4949
- [31260](https://github.com/apache/superset/pull/31260) Docker images now use `uv pip install` instead of `pip install` to manage the python envrionment. Most docker-based deployments will be affected, whether you derive one of the published images, or have custom bootstrap script that install python libraries (drivers)
50-
- [32867](https://github.com/apache/superset/pull/32867) Open Street Map or internal tiles can be set for deckgl visualization as it works out-of-the-box (as opposed to mapbox that requires an API key), please follow the steps documented here [https://github.com/apache/superset/pull/32867].
50+
- [33603](https://github.com/apache/superset/pull/33603) OpenStreetView has been promoted as the new default for Deck.gl visualization since it can be enabled by default without requiring an API key. If you have Mapbox set up and want to disable OpenStreeView in your environment, please follow the steps documented here [https://superset.apache.org/docs/configuration/map-tiles].
5151
- [32432](https://github.com/apache/superset/pull/31260) Moves the List Roles FAB view to the frontend and requires `FAB_ADD_SECURITY_API` to be enabled in the configuration and `superset init` to be executed.
5252

5353
### Potential Downtime

docs/docs/configuration/map-tiles.mdx

Lines changed: 54 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,26 @@ version: 1
66

77
# Map tiles
88

9-
Superset uses OSM and Mapbox tiles by default. OSM is free but you you need to set your API MAPBOX TOKEN in config.py
9+
Superset uses OSM and Mapbox tiles by default. OSM is free but you still need setting your MAPBOX_API_KEY if you want to use mapbox maps.
1010

11-
# Default values are equivalent to
11+
## Setting map tiles
12+
13+
Map tiles can be set with `DECKGL_BASE_MAP` in your `superset_config.py` or `superset_config_docker.py`
14+
For adding your own map tiles, you can use the following format.
15+
16+
```python
17+
DECKGL_BASE_MAP = [
18+
['tile://https://your_personal_url/{z}/{x}/{y}.png', 'MyTile']
19+
]
20+
```
21+
Openstreetmap tiles url can be added without prefix.
22+
```python
23+
DECKGL_BASE_MAP = [
24+
['https://c.tile.openstreetmap.org/{z}/{x}/{y}.png', 'OpenStreetMap']
25+
]
26+
```
27+
28+
Default values are:
1229
```python
1330
DECKGL_BASE_MAP = [
1431
['https://tile.openstreetmap.org/{z}/{x}/{y}.png', 'Streets (OSM)'],
@@ -21,14 +38,41 @@ DECKGL_BASE_MAP = [
2138
['mapbox://styles/mapbox/outdoors-v9', 'Outdoors'],
2239
]
2340
```
24-
# For adding your own map tiles, you can use the following format:
25-
- tile:// + your_personal_url or openstreetmap_url
41+
42+
It is possible to set only mapbox by removing osm tiles and other way around.
43+
44+
:::warning
45+
Setting `DECKGL_BASE_MAP` overwrite default values
46+
:::
47+
48+
After defining your map tiles, set them in these variables:
49+
- `CORS_OPTIONS`
50+
- `connect-src` of `TALISMAN_CONFIG` and `TALISMAN_CONFIG_DEV` variables.
2651

2752
```python
28-
DECKGL_BASE_MAP = [
29-
['tile://https://c.tile.openstreetmap.org/{z}/{x}/{y}.png', 'OpenStreetMap']
30-
]
31-
```
32-
# Enable CORS and set map url in origins option.
53+
ENABLE_CORS = True
54+
CORS_OPTIONS: dict[Any, Any] = {
55+
"origins": [
56+
"https://tile.openstreetmap.org",
57+
"https://tile.osm.ch",
58+
"https://your_personal_url/{z}/{x}/{y}.png",
59+
]
60+
}
3361

34-
# Add also map url in connect-src of TALISMAN_CONFIG variable.
62+
.
63+
.
64+
65+
TALISMAN_CONFIG = {
66+
"content_security_policy": {
67+
...
68+
"connect-src": [
69+
"'self'",
70+
"https://api.mapbox.com",
71+
"https://events.mapbox.com",
72+
"https://tile.openstreetmap.org",
73+
"https://tile.osm.ch",
74+
"https://your_personal_url/{z}/{x}/{y}.png",
75+
],
76+
...
77+
}
78+
```

0 commit comments

Comments
 (0)