Closed VictorVelarde closed 5 years ago
Is your feature request related to a problem? Please describe. Kepler.gl already has a 'Save/Share your map' feature where a user can upload the data into a Dropbox account and then create a public link to share. It would be really nice to have more providers to choose.
Describe the solution you'd like Adding a more generic approach to sharing could allow new providers besides Dropbox (eg. CARTO, Google Drive...) and also new ways of sharing the work in the future.
Describe alternatives you've considered We propose to generalize the approach in the code, so current Dropbox Share url would work the same but new providers could be integrated, starting with CARTO.
Additional context
The integration with a new CARTO provider for 'Share via URL' would look like this:
@rjimenezda please add some technical notes about the Implementation approach
/cc @alasarr
This would work pretty much the same as Dropbox. We will import a CARTO library that takes care of all the logic to authorize an App & store the data on your CARTO Account. The data for this particular use case will be public, and accesible via a URL, much like Dropbox's approach.
We might have to do some tweaks in the OAuth integrations, because Dropbox only provides a token, and CARTO provides an object (token, expiration date, etc). If we ever add support for other cloud providers I'm sure this will be helpful.
As for the reading back of the map config, we propose adding an extra URL argument that indicates what cloud provider the data is stored on. The reason for this is that some cloud providers could store the map config and the datasets on different places, so the URL parsing is up to that map provider. For instance, on the CARTO approach, we will store the data and the config separated. The URL might just look like kepler.gl/demo?provider=CARTO&map=cali_quakes
While writing this, I thought that maybe they're not a fan of that extra URL stuff.
We could make it so for public maps we store the whole map config, just like dropbox, data included. Then the mapUrl would be SQL API, with format=json
.
However, I hope they accept the extra URL stuff because writing such a potentially big row is going to be a problem, no matter what.
I think they will be ok as long as 'old version urls' keep working, with current default (provider=Dropbox)
Looks good to me.
The only thing I'd like to remove is the reference to the storage engine. and also new ways of sharing the work in the future (eg. private link).
Let's keep both approaches separated.
We have already created Issue 746 upstream, to follow the conversation
Goal: Create an issue using the Kepler's feature template at GitHub with our implementation idea for sharing maps via URL using CARTO. Note: The work on the implementation of this feature can be found here.
We can write the proposal here and, after reviewing it share it upstream