layer = new deck.GeoJsonLayer({
id: "counties",
data: states,
pickable: true,
stroked: true,
filled: true,
extruded: false,
wireframe: true,
lineWidthScale: 20,
lineWidthMinPixels: 2,
getFillColor: (d, i) => {
const { r, g, b, a } = d3.color(colorScale(i.index)) ?? {
r: 0,
g: 0,
b: 0,
a: 255
};
return [r, g, b, a];
},
getLineColor: [255, 255, 255],
getLineWidth: 1,
autoHighlight: true,
highlightColor: [255, 255, 0, 100]
})