My first time working with custom widgets in Experience Builder (v1.4), I thought I'd start with implementing and editing the layer toggle widget found here: https://github.com/Esri/arcgis-experience-builder-sdk-resources/tree/master/samples/widgets/view-lay....
I notice that pop-ups for the layers added to the map through this widget cannot be accessed. Could anyone help me figure out what modifications I need to make to enable pop-ups? I thought adding defaultPopupTemplateEnabled: true where the featureLayer is added (as I did below) in widget.tsx would work, but no luck:
if (evt.target.value && evt.target.value !== "") {
// Create and add the new Feature Layer
const featureLayer = new FeatureLayer({
url: evt.target.value,
defaultPopupTemplateEnabled: true
});
this.state.jimuMapView.view.map.add(featureLayer);
this.setState({
featureLayerOnMap: featureLayer,
});
}
} else {
console.error(
"You probably need to choose your map in the settings panel."
);
}
};
Thanks!