ThinkGeo.com    |     Documentation    |     Premium Support

Questions about textstyle

Hi,

I have few questions about the options of textstyle in a polygon
When I zoom in or zoom out, the label of a polygon has the same fontsize, so the display is not pretty.
There is a lot of options of display with Textstyle as AlllowLineCarriage, DrawingLevel, FittinglineInscreen, gridsize, etc
When I test them, I don’t see any difference …
For example, when I set FittingLineInScreen =true , i don’t see the difference if I set to false ;-(
Can you explain all these options, please ?
AllowLineCarriage = ?
BestPlacement = OK, but what is the rules according to the shape of the polygon ?
DrawingLevel = ?
DuplicateRule = ?
Filters = ?
FittingLineInScreen = ?
FittingPolygon = OK but if i zoom out, the text overflows the polygon
FittingPolygonFactor = ?
FittingPolygonInScreen = OK
ForceHorizontalLabelForLine = OK
ForceLineCarriage = ?
GridSize = What is the value of gridsize (1 or 100 or 500) ?
LabelAllLineParts = ?
LabelAllPolygonParts = ?
LabelPositions
OverlappingRule = OK
PolygonLabelingLocationMode = OK
SuppressPartialLabels = OK
TextLineSegmentRatio = ?
PointPlacement = OK mais I don’t see any difference between PointPlacement.LowerLeft or PointPlacement.UpperLeft
SplineType = ?
Advanced = ?

Using textstyle has an effect on the display performance ?
What are your tips for not having performance problems ?

There is an example "Scaling TextStyle for Polygon " Is that using the same system has an impact in terms of display performance ?(panning, zooming, etc …)

Thanks for your help.
Regards.

Hi Steph,
We have some ‘Summary’ and ‘Remarks’ for the options of TextStyle, please refer to the following screenshot.

For the display performance, Of course, the application will invoke some extra method for some special properties such as FittingPolygon , and I think our product is highly effective. If it is in the context of mega data, we can use the cache to resolve the performance problem.

The sample ‘Scaling TextStyle for Polygon’ and TextStyle in Map Suite Core are not ‘the same system’. ScalingTextStyle is a customized text style class inherits from TextStyle. It has some algorithm to modify the font-size dynamic. But in the TextStyle the font-size is fixed.
In fact, I don’t quite understand what you mean by ‘There is an example "Scaling TextStyle for Polygon " Is that using the same system has an impact in terms of display performance ?(panning, zooming, etc …)’, if something I misunderstood, please provide more information.

For “When I zoom in or zoom out, the label of a polygon has the same fontsize, so the display is not pretty.”

I think you can apply the ‘Scaling TextStyle for Polygon’ to you application or use multiple textstyle for different zoom-level, which might look something like this:

shapeFileFeatureLayer.ZoomLevelSet.ZoomLevel01.DefaultTextStyle = textStyle1;// font size: 5
shapeFileFeatureLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level05;

shapeFileFeatureLayer.ZoomLevelSet.ZoomLevel06.DefaultTextStyle = textStyle2;// font size: 7
shapeFileFeatureLayer.ZoomLevelSet.ZoomLevel06.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level10;

shapeFileFeatureLayer.ZoomLevelSet.ZoomLevel11.DefaultTextStyle = textStyle3;// font size: 8
shapeFileFeatureLayer.ZoomLevelSet.ZoomLevel11.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level15;

shapeFileFeatureLayer.ZoomLevelSet.ZoomLevel16.DefaultTextStyle = textStyle4;// font size: 10
shapeFileFeatureLayer.ZoomLevelSet.ZoomLevel16.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;

Finally, attached is a simple tool shows the TextStyle dynamically. Please check it out.
Wpf_TextStyleSample.zip (1.6 MB)

Hope it’s helpful.

Thanks,
Emil

Hi Emil,

Thank you for all those informations.
I have one last question regarding the display performance, uses less RAM …
What is the best approach ?

  1. Scaling Textstyle
  2. Or create a style for each zoomlevel ?

Thank you again for your help

Regards.
Steph.

Hi Steph,

I viewed our source code, found they are very close in terms of performance and RAM.

We recommend ‘Scaling TextStyle’.

The following is screenshot of a sample used the styles separately.
Scaling TextStyle:

Create a style for each zoomlevel:

Thanks,
Emil

Hi Emil,

Thanks.

According to graphs it’s " style for each levelzoom " which presents the best performances, no?

  • 22.864s : Style for each zoomlevel
  • 35.963s : Scaling TextStyle

Thanks.
Regards.
Steph.

Hi Steph,

The time is not the render complete time, it’s just the a invalid time when Emil get the screen capture after the test application start, you just need to notice the “Value”, it’s memory usage which related with performance.

Regards,

Don