Label offset in Javascript API?

4178
5
07-20-2015 03:13 PM
MatthewBaker2
Occasional Contributor II

All,

I don't see this anywhere, but is it possible to offset labels from their points using the Javascript API LabelLayer or LabelClass?

-m

Tags (1)
0 Kudos
5 Replies
thejuskambi
Occasional Contributor III

Its possible by both, but you need to set the x&y offset in the TextSymbol Class and not within the layer or LabelClass

OwenEarley
Occasional Contributor III

LabelClass has a labelPlacement property that can be used to control the position. Not sure if this is what you are after or an additional offset beyond these positions.

0 Kudos
ReneRubalcava
Frequent Contributor

I don't think there is a universal way to do it in the layer, but maybe via the TextSymbol in a renderer. Not quite sure, but could be the way to go.

0 Kudos
MatthewBaker2
Occasional Contributor II

Thank you Owen Earley​ and Rene Rubalcava​ -

Good to know those properties are there - but I don't know if it solves the issue of overlapping labels - unless there is a conflict detection that can be used with the label placement priorities as per ArcMap...

Hmmm...

0 Kudos
OwenEarley
Occasional Contributor III

Unfortunately, there is nothing anywhere near the sophistication of ArcMap dynamic label options in the JS API - especially when using Maplex labelling.