Problems with DrawLabelEx in version

Mar 10, 2016 at 10:38 PM
I am trying to update from MapWinGIS ActiveX component version 4.9.2 to and now I cannot draw a label on a screen-referenced drawing layer. The old API had an AddDrawingLabel method in the AxMap class, but that has been deprecated, with the suggestion to use AxMap.DrawLabelEx instead.

I have a very simple test app, which consists of a single Windows Form that contains just the map control. I create a screen-referenced drawing layer and try to add a label in various ways, but none of them result in the display of the label. I am able to draw a line on that layer. What I find strange is that if I uncomment any one of the three lines below that attempt to add the label, then the line will not be displayed.

I have set the background color of the map control to a light gray to make sure that the text color does not match the background color of the map.

What am I missing?
    public Form1()

        int handle = axMap1.NewDrawing(MapWinGIS.tkDrawReferenceList.dlScreenReferencedList);
        var labels = axMap1.get_DrawingLabels(handle);

        var color = System.Convert.ToUInt32(
        labels.FontColor = color;

        //labels.AddLabel("Hello", 100, 100);
        //axMap1.DrawLabel("Hello", 100, 100, 0);
        //axMap1.DrawLabelEx(handle, "Hello", 100, 100, 0);

        axMap1.DrawLineEx(handle, 200, 200, 300, 300, 2, color);
Mar 15, 2016 at 10:35 PM
I installed version and it works properly, so this is a problem starting with version