-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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): use an arbitraty Mabpox style URL (#26027) #26031
feat(deckgl-map): use an arbitraty Mabpox style URL (#26027) #26031
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.
Thanks @francois-travais for the PR. I've cc'ed in somewhat who is likely well versed with DeckGL to review your change. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #26031 +/- ##
=======================================
Coverage 69.10% 69.10%
=======================================
Files 1940 1941 +1
Lines 75865 75873 +8
Branches 8442 8447 +5
=======================================
+ Hits 52423 52431 +8
+ Misses 21268 21267 -1
- Partials 2174 2175 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Thanks @john-bodley . I know I'm missing a translation key (in the validator) but I cannot get babel script to work. I'm gonna try again today. |
@kgabryje Would you have time to look at this tiny PR please ? I would love to see this feature merged. Thanks |
superset-frontend/plugins/legacy-plugin-chart-map-box/src/controlPanel.ts
Show resolved
Hide resolved
superset-frontend/plugins/legacy-preset-chart-deckgl/src/utilities/Shared_DeckGL.jsx
Show resolved
Hide resolved
@francois-travais Thank you for your contribution, looks really nice! I added 1 small suggestion, lmk if it makes sense |
Signed-off-by: François Travais <francois.travais@solinum.org>
@kgabryje I modified the tooltip and moved Mapbox style select to a full line. |
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
@kgabryje do you know in which release this feature is planned ? I don't see it in 3.1.0rc3. |
|
It will be available in the next RC. |
…pache#26031) Signed-off-by: François Travais <francois.travais@solinum.org>
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
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
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
…pache#26031) Signed-off-by: François Travais <francois.travais@solinum.org>
…pache#26031) Signed-off-by: François Travais <francois.travais@solinum.org>
SUMMARY
In the DeckGL map plugin we can only select a Mapbox style from a predefined list.
I've made the select box free form, meaning that we can copy-paste a Mapbox style URL directly. I've also added a basic validator for UX purpose.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
Copy paste an arbitrary Mapbox URL in the select box and see the map change.
ADDITIONAL INFORMATION