Functions | Properties
Map labels
Map modules

Functions

void AxMap.AddLabel (int LayerHandle, string Text, uint Color, double x, double y, MapWinGIS.tkHJustification hJustification)
 Adds a label to the map.
void AxMap.AddLabelEx (int LayerHandle, string Text, uint Color, double x, double y, MapWinGIS.tkHJustification hJustification, double Rotation)
 Adds an extended label to the map, allowing for rotated labels.
void AxMap.ClearLabels (int LayerHandle)
 Clears all labels that have been added to the specified layer.
int AxMap.get_LayerLabelsOffset (int LayerHandle)
 Gets the offset for the labels on the layer.
bool AxMap.get_LayerLabelsScale (int LayerHandle)
 Gets whether to scale the labels on the layer.
bool AxMap.get_LayerLabelsShadow (int LayerHandle)
 Gets whether to use shadows for the labels on the layer.
uint AxMap.get_LayerLabelsShadowColor (int LayerHandle)
 Gets the shadow color for the labels on the layer.
bool AxMap.get_LayerLabelsVisible (int LayerHandle)
 Gets label visibility for the specified layer.
bool AxMap.get_UseLabelCollision (int LayerHandle)
 Gets a boolean value which indicates whether overlapping labels will be allowed for the layer.
void AxMap.GetLayerStandardViewWidth (int LayerHandle, ref double Width)
 Gets the standard view width used to scale the labels on the layer.
void AxMap.LabelColor (int LayerHandle, uint LabelFontColor)
 Sets the color of the font for labels of the layer.
void AxMap.LayerFont (int LayerHandle, string FontName, int FontSize)
 Sets the font to use when drawing labels for a layer.
void AxMap.LayerFontEx (int LayerHandle, string FontName, int FontSize, bool isBold, bool isItalic, bool isUnderline)
 Sets the font for labels of the layer.
void AxMap.set_LayerLabelsOffset (int LayerHandle, int __p2)
 Sets the offset for the labels on the layer.
void AxMap.set_LayerLabelsScale (int LayerHandle, bool __p2)
 Sets whether to scale the labels on the layer.
void AxMap.set_LayerLabelsShadow (int LayerHandle, bool __p2)
 Sets whether to use shadows for the labels on the layer.
void AxMap.set_LayerLabelsShadowColor (int LayerHandle, uint __p2)
 Sets the shadow color for the labels on the layer.
void AxMap.set_LayerLabelsVisible (int LayerHandle, bool __p2)
 Sets label visibility for the specified layer.
void AxMap.set_UseLabelCollision (int LayerHandle, bool __p2)
 Sets a boolean value which indicates whether overlapping labels will be allowed for the layer.
void AxMap.SetLayerStandardViewWidth (int LayerHandle, double Width)
 Sets the standard view width used to scale the labels on the layer.

Properties

bool AxMap.MultilineLabels [get, set]
 Gets or sets a boolean value which indicates whether multiline labels will be drawn correctly on the map.

Detailed Description

Here is a list of properties and methods to add and remove labels on the map. All these method are redirected to the instances of the Labels class for particular layers. Consider refering to those instances directly to improve performance (see Shapefile.Labels and Image.Labels). This module is a part of the documentation of AxMap class.

dot_inline_dotgraph_3.png

Graph description


Function Documentation

void AxMap.AddLabel ( int  LayerHandle,
string  Text,
uint  Color,
double  x,
double  y,
MapWinGIS.tkHJustification  hJustification 
)

Adds a label to the map.

Parameters:
LayerHandleThe handle of the layer where the label will be added to.
TextThe text to be used for the label.
ColorThe color of the added label. This is a UInt32 representation of an RGB color.
xThe x coordinate in projected map units which determines where the label will be added on the map.
yThe y coordinate in projected map units which determines where the label will be added on the map.
hJustificationSpecifies whether to justify the label's text right, left, or center.
void AxMap.AddLabelEx ( int  LayerHandle,
string  Text,
uint  Color,
double  x,
double  y,
MapWinGIS.tkHJustification  hJustification,
double  Rotation 
)

Adds an extended label to the map, allowing for rotated labels.

Parameters:
LayerHandleThe handle of the layer where the label will be added to.
TextThe text to be used for the label.
ColorThe color of the added label. This is a UInt32 representation of an RGB color.
xThe x coordinate in projected map units which determines where the label will be added on the map.
yThe y coordinate in projected map units which determines where the label will be added on the map.
hJustificationSpecifies whether to justify the label's text right, left, or center.
RotationThe number of degrees to rotate the label. Positive angles rotate the text counter-clockwise, and negative angles rotate the text clockwise
void AxMap.ClearLabels ( int  LayerHandle)

Clears all labels that have been added to the specified layer.

Parameters:
LayerHandle
int AxMap.get_LayerLabelsOffset ( int  LayerHandle)

Gets the offset for the labels on the layer.

The offset is the distance in pixels from the label point to the text.

Parameters:
LayerHandleThe handle of the layer for which the offset is to be set.
Returns:
The offset for the labels on the specified layer.
bool AxMap.get_LayerLabelsScale ( int  LayerHandle)

Gets whether to scale the labels on the layer.

Parameters:
LayerHandleThe handle of the layer for which the scaling of labels is to be set.
Returns:
A boolean value representing whether or not to scale the labels on the specified layer.
bool AxMap.get_LayerLabelsShadow ( int  LayerHandle)

Gets whether to use shadows for the labels on the layer.

Parameters:
LayerHandleThe handle of the layer for which the use of label shadows is to be set.
Returns:
A boolean value representing whether or not label shadows will be used for the specified layer.
uint AxMap.get_LayerLabelsShadowColor ( int  LayerHandle)

Gets the shadow color for the labels on the layer.

Parameters:
LayerHandleThe handle of the layer for which the shadow color is to be set.
Returns:
The color to use the shadow color of the specified layer. This is a System.UInt32 representation of an RGB color.
bool AxMap.get_LayerLabelsVisible ( int  LayerHandle)

Gets label visibility for the specified layer.

Parameters:
LayerHandleThe handle for the layer for which its label's visibility are to be set.
Returns:
A boolean value which determines whether the specified layer's labels are visible or not.
bool AxMap.get_UseLabelCollision ( int  LayerHandle)

Gets a boolean value which indicates whether overlapping labels will be allowed for the layer.

Parameters:
LayerHandleThe handle of the layer.
Returns:
True in case overlapping labels will be prevented and false otherwise.
void AxMap.GetLayerStandardViewWidth ( int  LayerHandle,
ref double  Width 
)

Gets the standard view width used to scale the labels on the layer.

Parameters:
LayerHandleThe handle of the layer for which the standard view width is required.
WidthReference parameter. The standard view width for the specified layer is returned through this parameter.
void AxMap.LabelColor ( int  LayerHandle,
uint  LabelFontColor 
)

Sets the color of the font for labels of the layer.

Parameters:
LayerHandleThe handle of the layer.
LabelFontColorThe color of the labels font.
void AxMap.LayerFont ( int  LayerHandle,
string  FontName,
int  FontSize 
)

Sets the font to use when drawing labels for a layer.

Parameters:
LayerHandleLayer handle of the layer for which the label fonts are to be set.
FontNameName of the font to use for the labels. (Ex: "Arial")
FontSizeSize of the font to use for the labels.
void AxMap.LayerFontEx ( int  LayerHandle,
string  FontName,
int  FontSize,
bool  isBold,
bool  isItalic,
bool  isUnderline 
)

Sets the font for labels of the layer.

Parameters:
LayerHandleThe handle of the layer.
FontNameThe name of the font.
FontSizeThe size of the font.
isBoldA boolean value which indicates whether the font is bold.
isItalicA boolean value which indicates whether the font is italic.
isUnderlineA boolean value which indicates whether the font is underlined.
void AxMap.set_LayerLabelsOffset ( int  LayerHandle,
int  __p2 
)

Sets the offset for the labels on the layer.

The offset is the distance in pixels from the label point to the text.

Parameters:
LayerHandleThe handle of the layer for which the offset is to be set.
__p2The offset for the labels on the specified layer.
void AxMap.set_LayerLabelsScale ( int  LayerHandle,
bool  __p2 
)

Sets whether to scale the labels on the layer.

Parameters:
LayerHandleThe handle of the layer for which the scaling of labels is to be set.
__p2A boolean value representing whether or not to scale the labels on the specified layer.
void AxMap.set_LayerLabelsShadow ( int  LayerHandle,
bool  __p2 
)

Sets whether to use shadows for the labels on the layer.

Parameters:
LayerHandleThe handle of the layer for which the use of label shadows is to be set.
__p2A boolean value representing whether or not label shadows will be used for the specified layer.
void AxMap.set_LayerLabelsShadowColor ( int  LayerHandle,
uint  __p2 
)

Sets the shadow color for the labels on the layer.

Parameters:
LayerHandleThe layer handle of the layer for which the shadow color is to be set.
__p2The color of use as the shadow color of the specified layer. This is a System.UInt32 representation of an RGB color.
void AxMap.set_LayerLabelsVisible ( int  LayerHandle,
bool  __p2 
)

Sets label visibility for the specified layer.

Parameters:
LayerHandleThe layer handle for the layer for which its label's visibility are to be set.
__p2A boolean value which determines whether the specified layer's labels are visible or not.
void AxMap.set_UseLabelCollision ( int  LayerHandle,
bool  __p2 
)

Sets a boolean value which indicates whether overlapping labels will be allowed for the layer.

Parameters:
LayerHandleThe handle of the layer.
__p2True in case overlapping labels will be forbidden and false otherwise.
void AxMap.SetLayerStandardViewWidth ( int  LayerHandle,
double  Width 
)

Sets the standard view width used to scale the labels on the layer.

Parameters:
LayerHandleThe handle of the layer for which the standard view width is to be set.
WidthThe new standard view width for the specified layer.

Properties

bool AxMap.MultilineLabels [get, set]

Gets or sets a boolean value which indicates whether multiline labels will be drawn correctly on the map.

Deprecated:
v 4.8. Multiline labels will be drawn after specification of appropriate label expression.
See also:
Labels.Expression.
 All Classes Files Functions Enumerations Properties