Select to view content in your preferred language

Different between label placement between 100.x and 200.x

222
4
a week ago
ModyBuchbinder
Esri Regular Contributor

It looks like there is a major different between labels in 100.x and 200.x

In 100.x when you pan the labels would be replaced by the new extent.

In 200.x it looks like if the label is still within the extent then it will not move or reposition. only if the old label is out side the extent (but the feature is in the extent) then the label will be replaced.

While the second method is quicker it show label in non ideal location.

It looks very bed for polygon when the first label is drown in the corner (when only the corner of the polygon is in the extent) but the label stay in the corner even when the polygon in in the center of extent.

Is there any easy way to set for the old label placement or at least ask the labels to redraw again in new positions

Thanks

0 Kudos
4 Replies
TrevorDraeseke
Emerging Contributor

Hi Mody,

 

This was by design to avoid extra computing and visual shuffling of labels on the map.

Out of curiosity, would a simple function that triggers a full redrawing of all labels meet your need? Something in your app code like:
- have a timer that counts time since the map was last panned/zoomed

- if greater than X seconds since last pan/zoom

- redraw all labels for current viewpoint <--- we'd need to expose a function that could do this

 

Thanks!

Trevor

0 Kudos
ModyBuchbinder
Esri Regular Contributor

Hi Trevor

Thanks for your answer.

We see two possible solution here

1) A flag that will set the redraw of the labels back to the old version. The help can notify that this is causing performance cost.

2) Option to redraw labels only (reposition labels). We can get the extent change event and run this (If the extent change is very little we might not run it at all).

Thanks

0 Kudos
TrevorDraeseke
Emerging Contributor

Thanks for clarifying!

We won't be able to reasonably provide option 1, because the labelling process is fundamentally different in the 200.X series.

I'll explore with the team the possibility of exposing a function like redrewLabelsForExtent(extent: Extent) or something like that.

Thanks!

Trevor

0 Kudos
TrevorDraeseke
Emerging Contributor


Pretty straightforward work around from the team. Toggle labels off then on again will trigger a redraw, like in the video shown above

0 Kudos