ArcGIS API 4.17 FeatureLayer does not draw

10-29-2020 07:53 AM
New Contributor

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.



esri-loader 2.16.0 (loading arcgis api 4.17)

Angular 10

0 Kudos
4 Replies
Frequent Contributor II

Can you provide a repro sample to test this out please.

0 Kudos
New Contributor

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 + '-' +,
url: url + '/' +,
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.

0 Kudos
New Contributor II


0 Kudos
New Contributor

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.

0 Kudos