How to prevent point symbols from disappearing when overlapped with a label from another layer or basemap

968
4
Jump to solution
06-15-2022 06:29 AM
AllenHuang
New Contributor III

I have a simple map composed of only a point graphic (in mapView.graphics) on top of a polygon layer on/ top of an Esri basemap. At certain zoom levels I notice that when it's too close or overlap with a label from the polygon layer or basemap, it would disappear. Is there anyway to prevent this?

0 Kudos
1 Solution

Accepted Solutions
PeterDimitrov1
Esri Contributor

Hello, 

I overlooked the fact you asked for JavaScript - the JavaScript API unfortunately only has limited support for deconfliction and no support for overlap. My apologies.
It would seem that in your case, it would be appropriate to experiment by setting deconfliction to `none`.

https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html#de...


Kind Regards,
Peter

View solution in original post

0 Kudos
4 Replies
PeterDimitrov1
Esri Contributor

Hi Allen, 

Disabling deconfliction or using DYNAMIC_NEVER_REMOVE for the point feature label class should stop the label from disappearing. 
https://developers.arcgis.com/java/api-reference/reference/com/esri/arcgisruntime/mapping/labeling/L...

If you would like some more detailed control, you can also adjust label definition settings such as:
- Feature Boundary Overlap: https://developers.arcgis.com/net/api-reference/api/netwin/Esri.ArcGISRuntime/Esri.ArcGISRuntime.Map...
- Feature Interior Overlap: https://developers.arcgis.com/net/api-reference/api/netwin/Esri.ArcGISRuntime/Esri.ArcGISRuntime.Map...
- Label Overlap:https://developers.arcgis.com/net/api-reference/api/netwin/Esri.ArcGISRuntime/Esri.ArcGISRuntime.Map...

I hope that helps.


0 Kudos
gpei_ahuang
New Contributor II

Are there any similar solutions from the Javascript API?

0 Kudos
PeterDimitrov1
Esri Contributor

Hello, 

I overlooked the fact you asked for JavaScript - the JavaScript API unfortunately only has limited support for deconfliction and no support for overlap. My apologies.
It would seem that in your case, it would be appropriate to experiment by setting deconfliction to `none`.

https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html#de...


Kind Regards,
Peter

0 Kudos
AllenHuang
New Contributor III

Thanks Peter

 

I will give that a try.

 

Allen

0 Kudos