[esri.core.workers] ErrorEvent {isTrusted: true, message: "Uncaught TypeError: Cannot read property 'displayId' of undefined", filename: "https://js.arcgis.com/4.20/@arcgis/core/assets/esri/core/workers/chunks/81cc112ecd9129c388d5.js", lineno: 1, colno: 123970, …} I got this error when enabling featureReduction for a featureLayer.
new FeatureLayer({
objectIdField: 'OBJECTID',
geometryType: 'point',
source: [],
fields: [*],
popupTemplate: {
outFields: ['*'],
returnGeometry: true,
content: (content: any) => {
return this.createGraphicPopupEl(content.graphic.layer.id, content.graphic.attributes);
}
},
featureReduction: {
type: 'cluster',
clusterRadius: '20px',
popupTemplate: {
title: 'Cluster summary',
content: 'This cluster represents {cluster_count} fenders.',
fieldInfos: [
{
fieldName: 'cluster_count',
format: {
places: 0,
digitSeparator: true,
},
},
],
},
symbol: {
type: 'simple-marker', // autocasts as new SimpleMarkerSymbol()
style: 'circle',
color: FENDER_COLOR,
size: '10px', // pixels
outline: {
color: [ 0, 0, 0, 0 ],
},
},
clusterMinSize: '20px',
clusterMaxSize: '30px',
labelingInfo: [
{
deconflictionStrategy: 'none',
labelExpressionInfo: {
expression: 'Text($feature.cluster_count, \'#,###\')',
},
symbol: {
type: 'text',
color: [ 255, 255, 255, 1 ],
font: {
weight: 'bold',
family: 'Roboto',
size: '15px',
},
},
labelPlacement: 'center-center',
},
],
}
})