fix: deck.gl Geojson path not visible (#24428)

This commit is contained in:
Kamil Gabryjelski 2023-06-16 14:30:52 +02:00 committed by GitHub
parent 23bb1c48a1
commit 6bb930ef4e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 7 deletions

View File

@ -123,14 +123,15 @@ export function getLayer(formData, payload, onAddFilter, setTooltip) {
return new GeoJsonLayer({
id: `geojson-layer-${fd.slice_id}`,
filled: fd.filled,
data: features,
stroked: fd.stroked,
extruded: fd.extruded,
pointRadiusScale: fd.point_radius_scale,
filled: fd.filled,
stroked: fd.stroked,
getFillColor,
getLineWidth: fd.line_width || 1,
getLineColor,
getLineWidth: fd.line_width || 1,
pointRadiusScale: fd.point_radius_scale,
lineWidthUnits: fd.line_width_unit,
...commonLayerProps(fd, setTooltip, setTooltipContent),
});
}

View File

@ -69,8 +69,23 @@ const config: ControlPanelConfig = {
controlSetRows: [
[fillColorPicker, strokeColorPicker],
[filled, stroked],
[extruded, null],
[lineWidth, null],
[extruded],
[lineWidth],
[
{
name: 'line_width_unit',
config: {
type: 'SelectControl',
label: t('Line width unit'),
default: 'meters',
choices: [
['meters', t('meters')],
['pixels', t('pixels')],
],
renderTrigger: true,
},
},
],
[
{
name: 'point_radius_scale',
@ -83,7 +98,6 @@ const config: ControlPanelConfig = {
choices: formatSelectOptions([0, 100, 200, 300, 500]),
},
},
null,
],
],
},