Carol,
I have double checked the 3.1.371 and ForceSplining is the member of SplineType.
Can you verify if you get the right version of new dll or not?
Thanks
James
Rotation angle of each letter in label
Thanks for your reply, James
Maybe I remove old dll incompletely.
Now, I remove all dll and use new dll again. It works well!
Carol,
I am glad it’s working with you.
Please let me know if you have more questions.
Thanks
James
Hello,
if I use rotate label setting, many label can’t show in the map.
TextStyle textStyle = new CustomTextStyle()
textStyle.TextColumnName = “ROADNAME”;
textStyle.Font = new GeoFont(“Arial”, 12);
textStyle.TextSolidBrush = new GeoSolidBrush(GeoColor.SimpleColors.Black);
textStyle.HaloPen=New GeoPen(GeoColor.StandardColors.White,3);
textStyle.SplineType = SplineType.ForceSplining;
textStyle.GridSize=10;
textStyle.FittingLineInScreen=True;
textStyle.OverlappingRule=LabelOverlappingRule.NoOverlapping;
textStyle.DuplicateRule = LabelDuplicateRule.UnlimitedDuplicateLabels;
When I use my orginal setting as follows. Many label can show in the Map.
(When I zoom out Map, this difference is obvous.)
textStyle TextStyle = TextStyles.CreateSimpleTextStyle(“ROADNAME”, “Arial”, 12, DrawingFontStyles.Bold, GeoColor.StandardColors.Black, GeoColor.StandardColors.White, 3, 0, 2);
textStyle.TextLineSegmentRatio = Double.MaxValue;
textStyle.OverlappingRule = LabelOverlappingRule.NoOverlapping;
textStyle.DuplicateRule = LabelDuplicateRule.UnlimitedDuplicateLabels;
layer.ZoomLevelSet.ZoomLevel01.CustomStyles.Add(textStyle)
GridSize seems can’t work in rotate label setting.
Carol,
Sorry for the delay because our spring festival time now.
From your codes, it seems you set the SplineType to ForceSpline, In this way it will check if the length of the label is larger than the road, then it will ignore this label.
Any more questions just feel free to let me know.
Thanks.
Yale
Thanks for your reply, Yale
But if I set the SplineType to other value, lables can't rotate as I want.
I don't know why the number of labels are different. (rotated labels are shown rarely)
Have any method to solve it?
In follow pictures are rotated labels and no rotated labels.
Rotated labels:
code:
Dim textStyle As TextStyle = New CustomTextStyle()
textStyle.TextColumnName = "RoadName"
textStyle.TextLineSegmentRatio = Double.MaxValue
textStyle.Font = New GeoFont("Arial", 12)
textStyle.TextSolidBrush = New GeoSolidBrush(GeoColor.SimpleColors.Black)
textStyle.HaloPen = New GeoPen(GeoColor.StandardColors.White, 3)
textStyle.SplineType = SplineType.StandardSplining
textStyle.GridSize = 30
textStyle.OverlappingRule = LabelOverlappingRule.NoOverlapping
textStyle.DuplicateRule = LabelDuplicateRule.UnlimitedDuplicateLabels
textStyle.FittingLineInScreen = True
no rotated labels:
code:
Dim textStyle As TextStyle = TextStyles.CreateSimpleTextStyle("RoadName", "Arial", 12, DrawingFontStyles.Regular, GeoColor.StandardColors.Black, GeoColor.StandardColors.White, 2, 0, 3)
textStyle.TextLineSegmentRatio = Double.MaxValue
textStyle.OverlappingRule = LabelOverlappingRule.NoOverlapping
textStyle.DuplicateRule = LabelDuplicateRule.UnlimitedDuplicateLabels
Carol,
Thanks for your reply.
I noticed that your two codes are somehow different except the SplineType, for example, when you rotated labels; you set the grid size, while you missed it in the “no rotated labels” side. Could you have a comparison with only the difference of SplineType set?
If possible, could you send us your complete codes including data for us? I am sure that would be more convenient to dig out your problem.
Any more questions just feel free to let me know.
Thanks.
Yale
Thanks for your reply, Yale
Sorry, I miss some code.
In rotated labels code, I refer James code in this issue.
rotated labels:
Dim textStyle As TextStyle = New CustomTextStyle() 'CustomTextStyle is set rotate angle
textStyle.TextColumnName = "RoadName"
textStyle.TextLineSegmentRatio = Double.MaxValue
textStyle.Font = New GeoFont("Arial", 12)
textStyle.TextSolidBrush = New GeoSolidBrush(GeoColor.SimpleColors.Black)
textStyle.HaloPen = New GeoPen(GeoColor.StandardColors.White, 3)
textStyle.SplineType = SplineType.ForceSplinging
textStyle.GridSize = 30
textStyle.OverlappingRule = LabelOverlappingRule.NoOverlapping
textStyle.DuplicateRule = LabelDuplicateRule.UnlimitedDuplicateLabels
textStyle.FittingLineInScreen = True
Dim textStyle As TextStyle = TextStyles.CreateSimpleTextStyle("RoadName", "Arial", 12, DrawingFontStyles.Regular, GeoColor.StandardColors.Black, GeoColor.StandardColors.White, 2, 0, 3)
textStyle.TextLineSegmentRatio = Double.MaxValue
textStyle.OverlappingRule = LabelOverlappingRule.NoOverlapping
textStyle.DuplicateRule = LabelDuplicateRule.UnlimitedDuplicateLabels
textStyle.GridSize = 30
I'm confused about the number of labels in the map.
Carol,
Thanks for your reply.
Just make sure your problem is what I understand now. When you use the SplineType( no matter it is StandardSpline or ForceSpline), the labels would be very sparse as shown in first picture, while it will lose the Spline effects when you do not use SplineType(set it to none).
One way to go around this is by adding 2 different TextStyles for it, first one is used to set the Spline, the second one is just a normal labeling style, one possible trick needed here for the second just the OverlappingRule to NoOverlapping to avoid duplicated labels appear.
Any more questions just feel free to let me know.
Thanks.
Yale