Select to view content in your preferred language

Feature Layer - label placement for polygons

156
1
10-09-2024 03:14 PM
DavidFriedrich_DEV
New Contributor

When creating a map via Pro and using the standard labeling engine, for a polygon layer, I have the following three options for label placement:
a) Always horizontal

b) Always Straight

c)Try horizontal first, then straight.

However, when using the Javascript SDK, adding this same layer as a FeatureLayer, using the "labelingInfo" property, I am not able to utilize any of the "labelPlacement" options except "always-horizontal".

Is there any way to utilize the other two options in a Javascript SDK app?

0 Kudos
1 Reply
JoelBennett
MVP Regular Contributor

Unfortunately, there is not.  As seen in the "Known Limitations" section near the top of the LabelClass documentation, "Polygon geometries only support always-horizontal labelPlacement."

Further below, the documentation for the labelPlacement property only gives the single option for polygons as well.

0 Kudos