Open trietphan94 opened 5 years ago
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.
Hi, @heshan0131 I am using google colab and there is no export button in the menu (generally when using Keplergl on a notebook). so, I am trying to find a way to save the output map as an image or better a pdf file. how can I access the image? if there is a way then I can use PIL to manipulate the image and save it as a pdf. one more thing, how can I save the map as JSON(via python)?
I want to export images with map config. Do we have this feature yet?