I have two LineShapes I wish to label. Both of these LineShapes live in different overlays, but have the exact same shape. I want one LineShape to have its label appear on one side of the LineShape, and I want the other to have its label appear on the other side, so the labels do not overlap. I have tried changing the PointPlacement property of the TextStyle for the label, but that doesn't seem to make any difference whatsoever - the labels for both lines always appear in the same place. Is there any way to achieve this effect?
Placing Labels on LineShapes
Hi Adam,
You could achieve this effect by setting several properties of the TextStyle for the label as following:
austinStreetsLabelLayer.ZoomLevelSet.ZoomLevel01.DefaultTextStyle.YOffsetInPixel = 10;
austinStreetsLabelLayer.ZoomLevelSet.ZoomLevel01.DefaultTextStyle.DuplicateRule = LabelDuplicateRule.UnlimitedDuplicateLabels;
austinStreetsLabelLayer.ZoomLevelSet.ZoomLevel01.DefaultTextStyle.OverlappingRule = LabelOverlappingRule.AllowOverlapping;
......
austinStreetsLabelLayer1.ZoomLevelSet.ZoomLevel01.DefaultTextStyle.YOffsetInPixel = -10;
......
Following is the screen shot:
If you still have problems please let us know.
Thanks,
Johnny
Thanks. I mistakenly thought that the X and Y offsets were in a coordinate system relative to the viewport, not relative to the point.
You are welcome. Let us know if you have other questions.