This code is cloning an existing featurelayer and using the layerinfo to a create a new featurelayer. I'm trying to turn off the popup for the new featurelayer. How can I do this? The code below does not work. I get the resultLayer, but the popup remains.
var layerInfo = lang.clone(this.resultLayers[layerIndex]);
var featureCollection = {
layerDefinition: layerInfo,
featureSet: null
};
resultLayer = new FeatureLayer(featureCollection, {
mode: FEATURELAYER.MODE_SELECTION,
popup: FeatureLayer.POPUP_NONE,
outFields: ["PIN"]
});