Could you provide me an example how to draw the nice looking road's numbers shown in the following images:
I've tried this way:
public static TextStyle HWNo(string textColumnName)
{
TextStyle ts = TextStyles.CreateSimpleTextStyle(textColumnName, "Arial", 9f, DrawingFontStyles.Bold, GeoColor.FromArgb(0xff, 0xff, 0xff, 0xff), GeoColor.StandardColors.Black, 2f, (float)0f, 0f);
ts.Mask = new AreaStyle(new GeoPen(GeoColor.FromArgb(0xff, 0xff, 0xff, 0xff), 2f), new GeoSolidBrush(GeoColor.FromArgb(0xff, 0x00, 0x00, 0xff)));
return ts;
}
myHWNoLayer.ZoomLevelSet.ZoomLevel01.CustomStyles.Add(HWNo("RoadNo"));
Its works, but it looks strange comparing to original HWs.jpg and I don't know how to write code that generate results like in the HWs.jpg. How should I go about creating round rectangles and make the blue shape like in the picture HWs.jpg?
So in second step I've tried to use an icon ( bmp file as a background) and draw the name on it using IconStyle:
myHWNoLayer.ZoomLevelSet.ZoomLevel01.DefaultTextStyle = new IconStyle(".\\HW.png", "RoadNo", new GeoFont("Arial", 12f, DrawingFontStyles.Bold), new GeoSolidBrush(GeoColor.StandardColors.White));
The result as I get is like iconstyle.jpg - The name is next to the icon, not on the top of icon.
I've tried to use properties like XOffsetInPixel and YOffsetInPixel but it moves the whole icon with name but just the name.
In the documentation I could not find any method to do this properly. Could you provide me an example code how to do this? Should I override any methods? Which styles should I use?
ERs.jpg:
HWs.jpg:
iconstyle.jpg: