apache / superset

Apache Superset is a Data Visualization and Data Exploration Platform
https://superset.apache.org/
Apache License 2.0
61.99k stars 13.59k forks source link

Tracking Issue: Migrating from Mapbox to MapLibre [Approved SIP-130] #30307

Open birkskyum opened 1 week ago

birkskyum commented 1 week ago

This is tracking the implementation of the Approved SIP-130

  1. Step - Update legacy mapbox/deckgl plugins

The legacy Mapbox / DeckGL plugins use react-map-gl v6. In react-map-gl v7, this library has dual support for mapbox and maplibre, and updating will thus bring immediate improvements, and reduce the gap when transition to MapLibre:

Switching to the Plugin on the new Plugin:

StarkillerGDN commented 1 week ago

Is it possible to have a configuration field in the UI to set a custom URL for a mapbox style ?

birkskyum commented 1 week ago

@StarkillerGDN , do you mean something like "mapbox://styles/mapbox/light-v9" url? If the mapbox license permits, I believe you could technically source the style from "https://api.mapbox.com/styles/v1/mapbox/light-v9". The mapbox:// protocol is to my understanding a simple url shorthand syntax for "https://api.mapbox.com", and this rewrite is not hardcoded into maplibre-gl.

StarkillerGDN commented 1 week ago

@birkskyum For example I have a Tileserver which serve mapbox styles. But to apply this new URI I must redeploy the superset instance with my hardcoded URI. Tell me if I'm wrong. It will be nice if we can provide a URI in a config file :)

birkskyum commented 1 week ago

Absolutely, you be be able to use your own tile server like you do already - that won't change. You can see here how some projects actually select maplibre specifically to obtain full control over the render stack. What tile server technology do you use?

datasc24 commented 1 day ago

Hello @birkskyum ! I agree with @StarkillerGDN, currently the tile server URL is hardcoded in the source code, which can make it difficult to customize for specific use cases. Indeed, to use our own tile server, we are obliged (if i understand correctly) to rebuild the entire project whereas we would like to use the Docker image directly instead.

It would be great if this URL could be configured via the superset_config.py file or as an alternative directly when building a chart (like in metabase).

Thank you for your work !

birkskyum commented 1 day ago

@datasc24 , @StarkillerGDN , it seems like this is important to get right, and I still don't fully understand the situation unfortunately, but I'll make sure to reach out and double check when it's time to tackle this.

Right now, I'm taking some preparation steps focused around modernizing the legacy mapbox/deckgl plugins in backwards compatible ways (already landed some perf improvements like #30305 ), as I believe having things cleaned up will benefit existing users now, and also ease the eventual migration to MapLibre.