Kepler.gl: Image export function with map config

Created on 31 Jul 2019  路  6Comments  路  Source: keplergl/kepler.gl

I want to export images with map config. Do we have this feature yet?

waiting for response

Most helpful comment

@heshan0131 Is there any update on getMapImage ? it would be a great help if this helps me to export the image of the map.
Basically i want to save the thumbnail image of the visualization in database?

All 6 comments

Hi @trietphan94 can you provide more details for your use case?

You can export your map to an image via the __export image__ feature: https://github.com/keplergl/kepler.gl/blob/master/docs/user-guides/k-save-and-export.md#export-image

You can also export your map configuration/data via __export_map__ feature: https://github.com/keplergl/kepler.gl/blob/master/docs/user-guides/k-save-and-export.md#export-map

When you export a map and choose JSON as your media, you are going to download both map configuration and data

Hi @macrigiuseppe, Thanks for your support. In my case, I have JSON with my current map config and data. I need an image export function that I just need to pass JSON into and export the image, no need to export the map.
Input:
{
datasets: datasets,
config: config
}

Output: Kepler image from the above input.

@trietphan94 our image export is using dom-to-image which means you still need to run kepler in a browser, We can provide a callback prop getMapImage or some sort for you to gather the map image with input like width and height resolution etc. Needs more details on how frequently you need to get an map image

@heshan0131, Thanks for your support. Very happy if the getMapImage function has the following parameters:
type (optinal): The content-type of the file to output. Can be one of 'image/png', 'image/jpeg', 'application/pdf'.
filename (optinal): The name of the exported file. Defaults to 'Kepler'.
width (optinal): Set the exact pixel width of the exported image or pdf.
callback

@heshan0131 Is there any update on getMapImage ? it would be a great help if this helps me to export the image of the map.
Basically i want to save the thumbnail image of the visualization in database?

I agree, exporting the visualization as an image _programmatically_ is a highly desired feature. There's often a requirement of creating many visualizations, for example per day, per month. Obviously, it's inconvenient to open 100s of images in a browser and saving them as image manually through the DOM.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tbicr picture tbicr  路  5Comments

reubengan93 picture reubengan93  路  5Comments

xJWzZ picture xJWzZ  路  5Comments

b2kdaman picture b2kdaman  路  4Comments

1995parham picture 1995parham  路  4Comments