ThinkGeo.com    |     Documentation    |     Premium Support

FittingPolygonInScreen not working properly

During our upgrade to TG14 I began to have some problems with labeling polygon features. Sometimes features were labeled properly while other features in the same layer were not labeled at all. I narrowed it down to property FittingPolygonInScreen of the TextStyle. If I set that property to False, the problems go away but then labels no longer reposition themselves to remain visible when some or all of a feature is off the map. Most of the time if the map is zoomed in far enough the labels will appear.

I have included a sample project to illustrate the problem. Note that when the project starts an error message is drawn to the map. If you zoom in far enough, labels will appear and the error message will go away.

Have a try and see what you think.

Thanks!

Steve
ThinkGeo_14_Demo.zip (2.7 MB)

Hi Steve,

We reproduced the issue with TextStyle.FittingPolygonInScreen when LabelAllPolygonParts is enabled. In that case, labels could still be positioned from the full polygon part instead of the visible portion on screen.

This has been fixed in the latest beta063. Please update to the latest beta package and try again. With the fix, when both FittingPolygonInScreen and LabelAllPolygonParts are enabled, each polygon part is clipped to the current screen extent and the label is placed using the largest visible portion.

Have a try and let us know if that works for you.

Thanks,
Ben