I have added a layer in my React app with kepler.gl.
But the visibility of the layer is turned off. I can manually toggle the visibility in the map but not able to do so using React.
This is my config which I am passing in addDataToMap
:
visState: {
layerBlending: "normal",
layers: [{
id: "hty62yd",
type: "point",
config: {
dataId: "dataset1",
label: "label1",
color: [
192,
192,
23
],
columns: {
lat: "lat",
lng: "lon"
}
},
isVisible: true,
radius: 80
}]
}
};
The
isVisible
parameter was in wrong place.Correct config is: