Select to view content in your preferred language

Polygon Label features dont show

2460
11
Jump to solution
08-01-2022 08:48 AM
ofirrosner
Emerging Contributor

Hello

I'm using this guide
with the example from JsonLabelClass
When i add a polygon and i want to add text to it with PolygonAlwaysHorizontal no text is showing.

But when I'm using any of the line options(e.g LineAboveBefore) it will show my text(not in the optimal way) but something i shown

why the polygon one is not showing and how can i overcome it?

0 Kudos
11 Replies
ofirrosner
Emerging Contributor

Do i have to do those line every time i want to add label definition 

 _overlay.LabelDefinitions.Clear();
_overlay.LabelsEnabled = true;
_overlay.LabelDefinitions.Add(labelDef);

mainly im talking about the Clear() .


When i was trying to fetch the current(via the unique guid) label definition  and update its properties, no changes happened on the map, but when i do clear() and add() its works just fine

does it mean i have to keep track of all label definition that are in a certain layer and when i update some property i would need to do clear() and addAll()(this will be my method when i have all previous label detentions) ?

0 Kudos
ofirrosner
Emerging Contributor

Works like a charm!
Thanks

0 Kudos