-
Notifications
You must be signed in to change notification settings - Fork 16.4k
feat(deckgl-map): add tile server layer support #27476
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
feat(deckgl-map): add tile server layer support #27476
Conversation
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.
2aec87e to
bd9f8d1
Compare
In the DeckGL map plugin we can only select a Mapbox style from the [predefined list](https://github.com/apache/superset/blob/2499a1cf5a7f298c1ee2f34b3d67ca1d18bb7457/superset-frontend/plugins/legacy-preset-chart-deckgl/src/utilities/Shared_DeckGL.jsx#L373-L380) or [typing a new Mapbox style URL](apache#26031). This change add support for tile server layer making use of Deck.gl [TileLayer](https://deck.gl/docs/api-reference/geo-layers/tile-layer). The well known OpenStreeMap layer provided by https://[abc].tile.openstreetmap.org/{z}/{x}/{y}.png is added to the list making easier for users not having a Mapbox account to have a background layer on map charts. It has been tested with other tile server URL eg. tile://https://tile.osm.ch/name-it/{z}/{x}/{y}.png
bd9f8d1 to
55e122c
Compare
|
When running
|
|
Hello ! Any update on this PR ? |
|
Relates to a SIP where we want to move from MapBox to MapLibre: |
|
Closing and reopening to kickstart CI. |
|
Maybe @Mattc1221 would be interested in reviewing this! |
|
Tank you @rusackas ! And thank you in advance @Mattc1221 ! |
|
Looks like the frontend build is failing CI, but I'm re-running it in case we get lucky. |
|
Hello, is this feature still in progress? It seems missing just the last mile. I've read about a mapbox switch to maplibre, but meanwhile this feature will be very valuable! I'm really not into frontend dev, but willing to help if someone can provide additional info on the failing pipeline step. |
|
I managed to get this feature works with just 2 additional changes to
# CORS Options
ENABLE_CORS = True
CORS_OPTIONS: dict[Any, Any] = {
"origins": [
"https://c.tile.openstreetmap.org",
]
}
"connect-src": [
"'self'",
"https://api.mapbox.com",
"https://events.mapbox.com",
"https://c.tile.openstreetmap.org",
],Can be these the cause of the failing pipeline? Anyway, thanks @fxprunayre for your work! |
|
Looks like there's a newer PR with pretty much the same functionality #32867 |
|
Done in #34204 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #27476 +/- ##
=======================================
Coverage 67.36% 67.36%
=======================================
Files 1909 1909
Lines 74678 74676 -2
Branches 8325 8324 -1
=======================================
- Hits 50309 50308 -1
+ Misses 22318 22317 -1
Partials 2051 2051 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
SUMMARY
In the DeckGL map plugin we can only select a Mapbox style from the predefined list or typing a new Mapbox style URL.
This change add support for tile server layer making use of Deck.gl TileLayer. The well known OpenStreeMap layer provided by https://[abc].tile.openstreetmap.org/{z}/{x}/{y}.png is added to the list making easier for users not having a Mapbox account to have a background layer on map charts.
It has been tested with other tile server URL
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Choose Mapbox, Openstreetmap or use a custom mapbox or tile URL
OSM background layer
TESTING INSTRUCTIONS
Select the OpenStreetMap background layer or paste a tile server URL eg.
tile://https://tile.osm.ch/name-it/{z}/{x}/{y}.png,tile://https://c.tile.openstreetmap.org/{z}/{x}/{y}.pngADDITIONAL INFORMATION