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?
Solved! Go to Solution.
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
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.
Are there any similar solutions from the Javascript API?
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
Thanks Peter
I will give that a try.
Allen