Docs/Examples for how addLayer worksSee original GitHub issue
Is your feature request related to a problem? Please describe.
There are examples provided on how to update the map config as well as add a new dataset, but it’s not really clear what the props look like for
addLayer. So if we want to add mutiple layers for a dataset, how could one go about it?
Describe the solution you’d like Some more dev focused examples and tutorials on how to add, remove, and update layers using JS instead of the UI.
Describe alternatives you’ve considered I have not considered alternatives. Kepler seems pretty robust, but I feel like there are a few examples missing when it comes to API usage. Like with the layer props there doesn’t seem to be much on what a KeplerJson dataset can look like/contain, or what all the fields for a config object are. I’m just not sure what exactly Kepler is capable of outside what I can glean from examples.
- Created 4 years ago
- Comments:5 (4 by maintainers)
Top GitHub Comments
@Harrisandwich I agree the API is missing when it comes to how to programmatically interact with layers and filters in kepler.gl. Although the necessary function is exported is there, we just have to surface it in our API design.
addLayer only add an empty layer without a specific type, you can pass in
isVisible: true, to set a type to it you will have to call
layerTypeCange, the design here is the reflect how user interact with kepler UI. They first click on
add layer button then select a type, and select columns
If you want to programmatically create layers without have to click kepler.gl UI, the best way is to call
addDataToMap and pass in the layer config
Closing for no activity