You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "fxprunayre (via GitHub)" <gi...@apache.org> on 2024/03/12 12:19:25 UTC

[PR] feat(deckgl-map): add tile server layer support [superset]

fxprunayre opened a new pull request, #27476:
URL: https://github.com/apache/superset/pull/27476

   ### SUMMARY
   
   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](https://github.com/apache/superset/pull/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](https://www.openstreetmap.org/) 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
   
   ![image](https://github.com/apache/superset/assets/1701393/5bc30c3e-5385-4cc6-9607-0abba8901fe4)
   
   OSM background layer
   
   ![image](https://github.com/apache/superset/assets/1701393/969bb7e1-5381-4457-8b6f-0b67b7c5624d)
   
   ![image](https://github.com/apache/superset/assets/1701393/6a0bdcf0-82dd-4a9f-afd7-028bfa4dd478)
   
   
   ### 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}.png`
   
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [x] Has associated issue: https://github.com/apache/superset/discussions/27475
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(deckgl-map): add tile server layer support [superset]

Posted by "fxprunayre (via GitHub)" <gi...@apache.org>.
fxprunayre commented on PR #27476:
URL: https://github.com/apache/superset/pull/27476#issuecomment-3410639432

   Done in https://github.com/apache/superset/pull/34204


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(deckgl-map): add tile server layer support [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on PR #27476:
URL: https://github.com/apache/superset/pull/27476#issuecomment-2455291518

   Looks like the frontend build is failing CI, but I'm re-running it in case we get lucky.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(deckgl-map): add tile server layer support [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on PR #27476:
URL: https://github.com/apache/superset/pull/27476#issuecomment-2447999242

   Closing and reopening to kickstart CI.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(deckgl-map): add tile server layer support [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on PR #27476:
URL: https://github.com/apache/superset/pull/27476#issuecomment-2447992456

   Relates to a SIP where we want to move from MapBox to MapLibre:
   https://github.com/apache/superset/issues/28356


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(deckgl-map): add tile server layer support [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on PR #27476:
URL: https://github.com/apache/superset/pull/27476#issuecomment-2448007644

   Maybe @Mattc1221 would be interested in reviewing this!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(deckgl-map): add tile server layer support [superset]

Posted by "datasc24 (via GitHub)" <gi...@apache.org>.
datasc24 commented on PR #27476:
URL: https://github.com/apache/superset/pull/27476#issuecomment-2431888179

   Hello ! Any update on this PR ?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(deckgl-map): add tile server layer support [superset]

Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #27476:
URL: https://github.com/apache/superset/pull/27476#issuecomment-3410640290

   ## [Codecov](https://app.codecov.io/gh/apache/superset/pull/27476?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :white_check_mark: All modified and coverable lines are covered by tests.
   :white_check_mark: Project coverage is 67.36%. Comparing base ([`2a5b5fe`](https://app.codecov.io/gh/apache/superset/commit/2a5b5fe0498bfa9359b8761a0df13a0ce2589645?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`55e122c`](https://app.codecov.io/gh/apache/superset/commit/55e122ce68aebb1ccac83b2a8c8ac1ac2d7f66ef?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 3063 commits behind head on master.
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@           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           
   ```
   </details>
   
   [:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/superset/pull/27476?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(deckgl-map): add tile server layer support [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas closed pull request #27476: feat(deckgl-map): add tile server layer support
URL: https://github.com/apache/superset/pull/27476


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(deckgl-map): add tile server layer support [superset]

Posted by "fxprunayre (via GitHub)" <gi...@apache.org>.
fxprunayre commented on PR #27476:
URL: https://github.com/apache/superset/pull/27476#issuecomment-1997693481

   When running ` npm run type`, I still see some issues
   ```
   plugins/legacy-preset-chart-deckgl/src/DeckGLContainer.tsx:108:11 - error TS2345: Argument of type 'TileLayer<any, { data: string; minZoom: 0; maxZoom: 19; tileSize: 256; renderSubLayers: (props: any) => BitmapLayer<{ data: undefined; image: any; bounds: [number, number, number, number]; }>[]; }>' is not assignable to parameter of type 'Layer<{}> | (() => Layer<{}>)'.
   ```
   `TileLayer` extends `CompositeLayer`. Superset codebase is quite new to me, so any guidance appreciated.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(deckgl-map): add tile server layer support [superset]

Posted by "lum4chi (via GitHub)" <gi...@apache.org>.
lum4chi commented on PR #27476:
URL: https://github.com/apache/superset/pull/27476#issuecomment-2722580899

   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.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(deckgl-map): add tile server layer support [superset]

Posted by "heyromnivan (via GitHub)" <gi...@apache.org>.
heyromnivan commented on PR #27476:
URL: https://github.com/apache/superset/pull/27476#issuecomment-2771743190

   Looks like there's a newer PR with pretty much the same functionality https://github.com/apache/superset/pull/32867 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(deckgl-map): add tile server layer support [superset]

Posted by "datasc24 (via GitHub)" <gi...@apache.org>.
datasc24 commented on PR #27476:
URL: https://github.com/apache/superset/pull/27476#issuecomment-2454535770

   Tank you @rusackas  ! And thank you in advance @Mattc1221 ! 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(deckgl-map): add tile server layer support [superset]

Posted by "lum4chi (via GitHub)" <gi...@apache.org>.
lum4chi commented on PR #27476:
URL: https://github.com/apache/superset/pull/27476#issuecomment-2737164557

   I managed to get this feature works with just 2 additional changes to `superset/config.py`:
   1. Enabling CORS and adding openstreetmap as origin:
   ```python
   # CORS Options
   ENABLE_CORS = True
   CORS_OPTIONS: dict[Any, Any] = {
       "origins": [
           "https://c.tile.openstreetmap.org",
       ]
   }
   ```
   2. Appending openstreetmap also in `TALISMAN_CONFIG` (both prod and dev config)
   ```python
   "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!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(deckgl-map): add tile server layer support [superset]

Posted by "fxprunayre (via GitHub)" <gi...@apache.org>.
fxprunayre closed pull request #27476: feat(deckgl-map): add tile server layer support
URL: https://github.com/apache/superset/pull/27476


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org