ThinkGeo.com    |     Blog    |     Wiki    |     Support

Label appearing on the line

How do I move a label by taking it off the line?

I create the style as below:

TextStyle textStyleVaoMT = TextStyles.LocalRoad1("BITOLA_FAS");
textStyleVaoMT.Font = new GeoFont("Tahoma", 6, DrawingFontStyles.Regular);
textStyleVaoMT.TextLineSegmentRatio = 100;
textStyleVaoMT.SplineType = SplineType.StandardSplining;
textStyleVaoMT.HaloPen = new GeoPen(GeoColor.StandardColors.White, 2);
textStyleVaoMT.TextSolidBrush = new GeoSolidBrush(GeoColor.StandardColors.Black);
textStyleVaoMT.YOffsetInPixel = -5;

Hi Danilo,

Your direction is correct, you can set the YOffsetInPixel a bigger value for example -20 to see whether it works well.

If that don’t works well, you can try this property: BestPlacement

Regards,

Ethan

Thank you, Ethan.

I placed a larger value for YOffsetInPixel and used the BestPlacement property. Problem solved.

Hi Danilo,

Thanks for your update, any question please let us know.

Regards,

Ethan