I have a feature layer with polygons and I want to place a label in the center of the polygon. I tried with polylines and polygons both but with the current label placement options available I am not able to place it in the center.
Is there any way to do this?
Hi @PrashantR,
You can try:
1. to find the centroid of each polygon and set the label
2. if you are using LabelClass, then you can set the labelPlacement property
Hi there,
The always-horizontal label placement for polygons always places the labels at the center of polygons. Is this what you are not seeing? Here is a simple codepen that shows labels for polygon features: https://codepen.io/matt9222/pen/LYXeqdP?editors=1000