Feature labels not visible when zooming out - polyline based feature layer

399
4
09-01-2021 04:21 AM
w-keet
by
New Contributor

Hi, 

I am using ArcGIS v4.20, and I am experiencing some strange behaviour when adding a label (LabelClass) to a polyline based feature layer. The text label becomes visible when I zoom in close enough, but when I zoom out the text label disappears even though the line (polyline) is still visible. It seems that the label overflows past the start and end points of the feature line, which results in the text being hidden. This is just an observation and not a description of the problem. 🙂

Any suggestions on how this can be resolved?

I have added two screenshots, and also a link to codepen (https://codepen.io/w-keet/pen/JjJXWob)

Regards

Wayne

0 Kudos
4 Replies
David_Brooks
MVP Regular Contributor

@w-keet Have you set your deconfliction value to none?

 

labelClass.deconflictionStrategy = "none";

 

by default, it's set to static, if not declared. So labels are dropped where they conflict with others.

Also, you've probably already double checked this, but do you have a max and min scale defined?

  maxScale: 0,
  minScale: 25000000,

David
..Maps with no limits..
0 Kudos
w-keet
by
New Contributor

Hi David, 

Yes I've tried to set deconflictionStrategy to "none" (and static/dynamic) and max/minScale, but the result remains the same, unfortunatly. 😞

I also updated the code sample to use these properties mentioned. (https://codepen.io/w-keet/pen/JjJXWob)

 

0 Kudos
David_Brooks
MVP Regular Contributor

Unfortunately, I think you've reached the limit of the APIs labelling capabilities. The only other option would be to create an invisible point feature and label this. But you'd then have label orientation issues.


David
..Maps with no limits..
0 Kudos
w-keet
by
New Contributor

The strange thing is that we also use a C# .net library for esri ArcGIS in another project (old Silverlight app), and in that project it works perfectly fine. The label is visible as long as the feature layer is visible and enabled. 

It seems like it might be different implementations for the various supported libraries. 🤔

0 Kudos