I'm trying to add a data layer in kepler.gl using react, but my data layer is not showing layer

91 views Asked by At

I'm trying to add a cluster layer in kepler.gl map programmatically for the first time when the data is dispatched on the map, but I'm not able to see any layer so need help with that

        dispatch(
                addDataToMap({
                datasets: {
                    info: {
                    label: "Vehicle Data",
                    id: "action",
                    },
                    data: transformedData,
                },
                option: {
                    centerMap: true,
                    readOnly: false,
                },
                config: {
                    version: "v1",
                    config: {
                    visState: {
                        layers: [
                        {
                            type: "cluster",
                            config: {
                            id: "action",
                            columns: {
                                lat: "latitude",
                                lon: "longitude",
                            },
                            isVisible: true,
                            },
                        },
                        ],
                    },
                    },
                },
                })
            );
1

There are 1 answers

1
shiv On

you have to make datasets as a array...