-
Notifications
You must be signed in to change notification settings - Fork 15.2k
feat(deckgl): add support for OpenStreetMap as our new default and make "tile-providers" more configurable #33603
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
base: master
Are you sure you want to change the base?
Conversation
Coming from MR : #32867 (Inadvertently closed by failed rebase) @mistercrunch I have implemented what you asking for about OSM map with deckgl. |
@mistercrunch Processing your ephemeral environment request here. Action: up. More information on how to use or configure ephemeral environments |
Nice! firing up CI and an ephemeral env. Really excited that deckgl-powered visualization will now work out of the [map]box!!! |
@@ -47,6 +47,7 @@ There's a migration added that can potentially affect a significant number of ex | |||
- [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 | |||
- [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. | |||
- [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) | |||
- [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]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! A+ for change-management here!
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #33603 +/- ##
===========================================
+ Coverage 60.48% 72.95% +12.47%
===========================================
Files 1931 558 -1373
Lines 76236 40283 -35953
Branches 8568 4222 -4346
===========================================
- Hits 46114 29390 -16724
+ Misses 28017 9802 -18215
+ Partials 2105 1091 -1014
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
@mistercrunch Ephemeral environment spinning up at http://44.248.152.230:8080. Credentials are 'admin'/'admin'. Please allow several minutes for bootstrapping and startup. |
The ephemeral environment doesn't seem to load openstreetmap out of the box (?) |
464f56d
to
fb7bdd0
Compare
@mistercrunch Processing your ephemeral environment request here. Action: up. More information on how to use or configure ephemeral environments |
@ Ephemeral environment creation failed. Please check the Actions logs for details. |
@@ -119,6 +119,8 @@ flask-caching==2.3.1 | |||
# via apache-superset (pyproject.toml) | |||
flask-compress==1.17 | |||
# via apache-superset (pyproject.toml) | |||
flask-cors==4.0.2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, wondering if you added this manually? This is not self-evident, but this file is supposed to be compiled by uv pip compile
via the script at https://github.com/apache/superset/blob/master/scripts/uv-pip-compile.sh . I think the proper way is to alter https://github.com/apache/superset/blob/master/requirements/base.in#L19 to add a line referencing to .[cors]
, and then running the script...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm trying to clarify how it should be done here -> #33714
In you case I think adding a line for .[cors]
in base.in
makes most sense. Either that or promoting the one dep in cors to the core set of dependencies in pyproject.toml
@mistercrunch Processing your ephemeral environment request here. Action: up. More information on how to use or configure ephemeral environments |
@mistercrunch Ephemeral environment spinning up at http://44.246.245.101:8080. Credentials are 'admin'/'admin'. Please allow several minutes for bootstrapping and startup. |
* @param v | ||
*/ | ||
export default function validateMapboxStylesUrl(v: unknown) { | ||
if ( | ||
typeof v === 'string' && | ||
v.trim().length > 0 && | ||
v.trim().startsWith('mapbox://styles/') | ||
(v.trim().startsWith('mapbox://styles/') || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about trim()
once above the if
block?
"@deck.gl/core": "^9.0.37", | ||
"@deck.gl/layers": "^9.0.38", | ||
"@deck.gl/react": "^9.1.4", | ||
"@deck.gl/aggregation-layers": "^9.1.9", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice side-win to upgrade to a newer deck.gl!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wow btw looks like this ends up affecting 20k LoC in pacakge-lock.json (!?) curious on doing a sanity check on what's happening in there.... GitHub won't let me expand and don't have time to pull the branch to diff it, but would be great if you can validate/explain why changing a few lines here results in so much package-lock changes (?)

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed i pushed package-lock.json after making an "npm i --force", should be fix now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks much better now!
v.trim().startsWith('mapbox://styles/') | ||
(v.trim().startsWith('mapbox://styles/') || | ||
v.trim().startsWith('tile://http') || | ||
v.trim().includes('osm') || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this seems a bit dangerous, seems startswith https://tile.osm
or https://tile.openstreetmap
might be safer. There's probably a fancy one-liner-type expression like allowedPrefix.some(s => trimmed.startswith(s)))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a few comments but super bullish on pushing this through! Amazing work!
QQ, would it be easy to add a few more grayscale, perhaps a dark and light more in there? Curious what tiles are provided as part of OSM and if it's easy to match the kind of diversity that we have on the Mapbox side of the house...
Thank you guys or the great work here, are you going to release this soon? I have the same need of configuring map tiles server and it would be great to have it with superset! |
Happy to merge once the few minor comments are addressed. Likely to first hit in 6.0, which we'll cut and stabilize as soon as 5.0 is released, and the large Theming-related branch is merged. |
b47fb9f
to
cefa7e1
Compare
I tried to find new ones but unfortunately there are only availables when connecting on their website |
779a2ea
to
5b9fce0
Compare
@mistercrunch Processing your ephemeral environment request here. Action: up. More information on how to use or configure ephemeral environments |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! I fired up a fresh ephemeral env to make sure things look good and OSM loads out-of-the-box. Will do some basic checks there before merging.
Amazing contribution btw ❤️ ❤️ ❤️
Took the freedom to update the PR title as it'll become the commit message in |
Almost there! Though it looks like there's a unit test failing here -> https://github.com/apache/superset/actions/runs/15833515890/job/44633495868?pr=33603 |
@mistercrunch Ephemeral environment spinning up at http://35.89.168.235:8080. Credentials are 'admin'/'admin'. Please allow several minutes for bootstrapping and startup. |
GPT seems to think there are some free/open options here -> https://chatgpt.com/share/6859b984-7d54-8010-8b86-10d483bc4fa2 |
For context Theming + dark mode just landed in It's not a requirement to sort this out prior to merging this PR, but would be nice to eventually have that option. |
About the conflict on package-lock, we get that all the time. Usually you just want to |
SUMMARY
This PR introduces support for OpenStreetMap as the tile provider behind deckgl charts. It also changes the default tile-provider to be OpenStreetMap, since Mapbox isn't as open and requires configuration + an API key. This PR makes tile-providers configurable, so it's possible for those who have an API key and prefer Mapbox to match the default as of before-this-PR.
Changing defaults here is a "breaking change" in the sense that the default is changing, but you can reproduce the previous behavior with a bit of documented configuration.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
In config.py set the following
And in TALISMAN_DEV_CONF
add "https://c.tile.openstreetmap.org" to 'connect-src' array
ADDITIONAL INFORMATION