You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to modify the color of GeoJsonLayer dynamically, but failed
new GeoJsonLayer({
id: 'HEAT_MAP' ,
data: geojson, // geojson is a variable, everytime before render it will be computed again
opacity: 1,
stroked: false,
extruded: true,
elevationScale: 1,
lineWidthUnits: 'meters',
lineWidthMinPixels:1,
lineWidthMaxPixels:3,
getElevation: f => Math.sqrt(f.properties.valuePerSqm) * 10,
getFillColor: d => {
if(d.properties.num) return [255, 0, 0] // get the attribute of num and get the colorValue
else return [0, 0, 0, 0]
},
getLineWidth: 1,
getRadius: 10,
getLineColor: [103, 113, 121],
pickable: true,
})
The text was updated successfully, but these errors were encountered:
I want to modify the color of GeoJsonLayer dynamically, but failed
The text was updated successfully, but these errors were encountered: