Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fxprunayre
Copy link

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

image

OSM background layer

image

image

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

  • Has associated issue: Add tile layer (XYZ) support in deck.gl maps #27475
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • 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

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Congrats on making your first PR and thank you for contributing to Superset! 🎉 ❤️

We hope to see you in our Slack community too! Not signed up? Use our Slack App to self-register.

@john-bodley john-bodley requested a review from villebro March 12, 2024 17:20
@fxprunayre fxprunayre force-pushed the feat-chart-map-tile-server-support branch from 2aec87e to bd9f8d1 Compare March 14, 2024 15:03
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
@fxprunayre fxprunayre force-pushed the feat-chart-map-tile-server-support branch from bd9f8d1 to 55e122c Compare March 14, 2024 15:08
@fxprunayre
Copy link
Author

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.

@datasc24
Copy link

Hello ! Any update on this PR ?

@rusackas
Copy link
Member

Relates to a SIP where we want to move from MapBox to MapLibre:
#28356

@rusackas
Copy link
Member

Closing and reopening to kickstart CI.

@rusackas rusackas closed this Oct 30, 2024
@rusackas rusackas reopened this Oct 30, 2024
@rusackas rusackas requested a review from kgabryje October 30, 2024 18:20
@rusackas
Copy link
Member

Maybe @Mattc1221 would be interested in reviewing this!

@datasc24
Copy link

datasc24 commented Nov 4, 2024

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

@rusackas
Copy link
Member

rusackas commented Nov 4, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants