keplergl / keplergl/kepler.gl

Implement API to generate map image

Open
#981 5 comments 7 reactions 1 assignee Claimed by @heshan0131 View on GitHub
Dominant language
TypeScript
Stars
12k
Forks
2k
Avg merge
1d 5h
Merged PRs (30d)
66

Description

Currently the logic of generate a image of the map is packaged inside kepler. and it's not easy to access via dependency injection. We can design a action / callback API to allow user to dispatch action and pass a call back to save the generated map image, Something like this:

```js
import {generateMapImage} from 'kepler.gl/actions';
// dispatch an action to retrieve map thumbnail upon user interaction, pass dimension and onUpdate callback
onClick() {
this.props.dispatch(generateMapImage({
dmension: {width: 500, height: 500, resolution: 2},
onUpdate: (dataUrl) => this.props.saveCurrentMapImage(dataUrl)
)
}
```

https://github.com/keplergl/kepler.gl/issues/974

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.