banzatto
Posts: 21
Joined: Tue Jul 03, 2007 11:38 pm

Labels and .NETCF don't appear ???

Wed Sep 09, 2009 9:27 pm

I have a application running in Windows Mobile 5 and open shapefile with 100MB and labels don't appear ? why ?

mf = map1.NewMapShapeFile(sf);

// Set a resolution of 2 pixels - all shapes smaller than this will not be drawn.
// Nodes that are closer together than this will also not be drawn.
mf.Resolution = 2;

// Create a brush with green color and transparent
GpsViewNET.Brush brush = new GpsViewNET.Brush();
brush.Green = 255;
brush.Transparent = false;
// Set the brush to the background property of the mapshapefile
mf.Background = brush;

mf.ShowLabels = true;

GpsViewNET.LabelTemplate l = new GpsViewNET.LabelTemplate();
l.ColumnIndex = 0;
GpsViewNET.Pen pl = new GpsViewNET.Pen();
pl.Red = 255;
pl.Width = 1;
l.Border = pl;


GpsViewNET.Brush bl = new GpsViewNET.Brush();
bl.Red = 255;
bl.Blue = 255;

l.GetBackground = bl;

GpsViewNET.TextFont tl = new GpsViewNET.TextFont();
tl.Bold = true;
tl.Color = new GpsViewNET.Pen();
tl.Color.Width = 1;
tl.Size = 12;
tl.Face = "Tahoma";
l.Font = tl;

l.Overlapping = true;
l.Duplicates = true;

mf.LabelTemplate = l;

// call an update of the Map to draw it
Atualizar();

Return to “GpsTools”