I am using a sublayer as a FeatureLayer to perform some advanced labeling. The code already works in 4.16 (and all previous releases), but as of 4.17, the layer no longer draws at all. I get no console errors or network traffic that indicates any issues.
If I start removing properties, like the definitionExpression, labelingInfo and renderer, the layer will draw, but after a few seconds, it disappears. Afterwards, it behaves very oddly where it might draw a few features only or none at all. Again, I get no console errors or network errors that would indicate any issues. I've tried this in Chrome and Edge so far.
Environment:
esri-loader 2.16.0 (loading arcgis api 4.17)
Angular 10
Can you provide a repro sample to test this out please.
My code is pretty simple for adding the FeatureLayer, this code is within a function. We than add the layer to the map immediately after:
const layer = new esri.FeatureLayer(
{
id: labelData.layerId + '-' + sublayer.id,
url: url + '/' + sublayer.id,
title: labelData.labelName,
legendEnabled: false,
visible: labelData.visible,
// definitionExpression: defExp,
// labelingInfo: this.createLabelClass(labelData, sublayer.attributes),
// renderer: {
// type: 'simple',
// symbol: this.getSymbol(labelData.geometryType)
// }
}
);
return layer;
Again, I get absolutely no console errors or messages. This screenshot is from 4.16:
And this is 4.17:
The code is exactly the same and has always worked until 4.17.
..
Hi @KavishGhime3. For some odd reason, I don't see your reply to me here, but I can see it in my email.
To answer some questions; my layer is a sublayer of a mapimageservice, not a featureserver. I have used some sample apps to replicate. In pure JavaScript, it works fine, but with the esri-loader, it does not work when a definitionExpression is applied.
So, basically I've narrowed it down to a sublayer from a mapimageservice used with the esri-loader when a definitionExpression is applied. I am working with ESRI Premium Support and others to see if this issue is on my end or in the esri-loader.