Returns information about a specific label override.
Syntax
LabelOverrideInfo (
window_id, layer_number, labeloverride_index, attribute )
window_id is the integer window identifier of a Map window.
layer_number is the number of a layer in the current Map window (for example, 1 for the top layer); to determine the number of layers in a Map window, call the MapperInfo() function.
labeloverride_index is an integer index (1-based) for the override definition within the layer. Each label override is tied to an zoom range and is ordered so that the smallest zoom range value is on top (index 1).
attribute is a code indicating the type of information to return; see table below.
Return Value
Return value depends on attribute parameter.
Description
The LabelOverrideInfo() function returns label information for a specific label override for one layer in an existing Map window. The layer_number must be a valid layer (1 is the topmost table layer, and so on). The attribute parameter must be one of the codes from the following table; codes are defined in MAPBASIC.DEF.
Attribute Code | ID | LabelOverrideInfo() Return Value |
---|---|---|
LBL_OVR_INFO_NAME | 1 | Label override name. |
LBL_OVR_INFO_VISIBILITY | 2 | Smallint value, indicating whether the override label are visible. The return value will be one of:
|
LBL_OVR_INFO_ZOOM_MIN | 3 | Float value, indicating the minimum zoom value (in MapBasic's current distance units) at which the label override displays. |
LBL_OVR_INFO_ZOOM_MAX | 4 | Float value, indicating the maximum zoom value at which the label override displays. |
LBL_OVR_INFO_EXPR | 5 | String value, the expression used in labels. |
LBL_OVR_INFO_LT | 6 | SmallInt value, indicating what type of line, if any, connects a label to its original location after you move the label. The return value will match one of these values:
|
LBL_OVR_INFO_FONT | 7 | Font style used in labels. |
LBL_OVR_INFO_PARALLEL | 8 | Logical value, TRUE if layer is set for parallel labels. |
LBL_OVR_INFO_POS | 9 | SmallInt value, indicating label position. Return value will match one of these values (T=Top, B=Bottom, C=Center, R=Right, L=Left):
|
LBL_OVR_INFO_OVERLAP | 10 | Logical value, TRUE if overlapping labels are allowed. |
LBL_OVR_INFO_DUPLICATES | 11 | Logical value, TRUE if duplicate labels are allowed. |
LBL_OVR_INFO_OFFSET | 12 | SmallInt value from 0 to 50, indicating how far the labels are offset from object centroids. The offset value represents a distance, in points. |
LBL_OVR_INFO_MAX | 13 | Integer value, indicating the maximum number of labels allowed for this label layer override. If no maximum has been set, return value is 2,147,483,647. |
LBL_OVR_INFO_PARTIALSEGS | 14 | Logical value, TRUE if the Label Partial Objects check box is checked for this layer. |
LBL_OVR_INFO_ORIENTATION | 15 | Returns Smallint value, indicating the setting for the layer's auto label orientation. Return value will be one of these values:
If LAYER_INFO_LABEL_ORIENT_PARALLEL is returned then LBL_OVR_INFO_PARALLEL returns TRUE. |
LBL_OVR_INFO_ALPHA | 16 | SmallInt value, representing the alpha factor for the labels of the specified layer.
To turn set the translucency or alpha for a layer, use the Set Map label clause statement, see Managing Individual Label Properties.. |
LBL_OVR_INFO_AUTODISPLAY | 17 | Logical value, TRUE if this label override is set to display labels automatically. |
LBL_OVR_INFO_POS_RETRY | 18 | Logical value, TRUE if label overlaps with others, try multiple label positions until a position is found that does not overlap any other labels, or until all position are exhausted. |
LBL_OVR_INFO_LINE_PEN | 19 | Pen style used for displaying the label line. |
LBL_OVR_INFO_PERCENT_OVER | 20 | SmallInt value, max percentage curved label can overhang polyline. |
LBL_OVR_INFO_AUTO_POSITION | 21 | Logical value, TRUE if the advanced region labeling option for the label override is on or off. |
LBL_OVR_INFO_AUTO_SIZES | 22 | Integer value, indicates the number of font sizes that can be used when attempting to fit labels within regions for the label override. The number of fonts can range from 1 to 10. A 0 (zero) value indicates that Default is chosen, so that MapInfo Pro defines the number of fonts to use. |
LBL_OVR_INFO_SUPPRESS_IF_NO_FIT | 23 | Logical value: TRUE if this labeling option is On. If after applying the optional font size step-downs the label still does not fit in the region, then the label is not drawn. |
LBL_OVR_INFO_AUTO_SIZE_STEP | 24 | Integer value, defines the overall percentage font size step used for automatically resizing the label font to make a label fit for label override. If the original font size is 24 pt and the size step is defined as 66, then the smallest font will be 66% smaller than 24 pt (the smallest font will be 8pt). |
LBL_OVR_INFO_CURVED_BEST_POSITION | 25 | Logical value, indicates if the auto positioning for curved labels is on or off. |
LBL_OVR_INFO_CURVED_FALLBACK | 26 | Logical value, indicates if the option to fallback to create a rotated label is on or off. |
LBL_OVR_INFO_USE_ABBREVIATION | 27 | Logical value, indicates if use of abbreviations is on or off. |
LBL_OVR_INFO_ABBREVIATION_EXPR | 28 | Returns the field expression used for abbreviated labels. |
LBL_OVR_INFO_AUTO_CALLOUT | 29 | Logical value, TRUE if the advanced region labeling option of rendering a callout for the label override is on. |
LBL_OVR_INFO_EXPR_EDITED | 30 | Logical value, representing whether the expression property has been edited or not (in comparison with base layer). |
LBL_OVR_INFO_LT_EDITED | 31 | Logical value, representing whether the line type property has been edited or not. |
LBL_OVR_INFO_FONT_EDITED | 32 | Logical value, representing whether the font property has been edited or not. |
LBL_OVR_INFO_PARALLEL_EDITED | 33 | Logical value, representing whether the orientation property has been edited or not. |
LBL_OVR_INFO_POS_EDITED | 34 | Logical value, representing whether the position property has been edited or not. |
LBL_OVR_INFO_OVERLAP_EDITED | 35 | Logical value, representing whether the overlap property has been edited or not. |
LBL_OVR_INFO_DUPLICATES_EDITED | 36 | Logical value, representing whether the duplicates property has been edited or not. |
LBL_OVR_INFO_OFFSET_EDITED | 37 | Logical value, representing whether the offset property has been edited or not. |
LBL_OVR_INFO_MAX_EDITED | 38 | Logical value, representing whether the maximum labels property has been edited or not. |
LBL_OVR_INFO_PARTIALSEGS_EDITED | 39 | Logical value, representing whether the partial segments property has been edited or not. |
LBL_OVR_INFO_ORIENTATION_EDITED | 40 | Logical value, representing whether the orientation property has been edited or not. |
LBL_OVR_INFO_ALPHA_EDITED | 41 | Logical value, representing whether the alpha property has been edited or not. |
LBL_OVR_INFO_AUTODISPLAY_EDITED | 42 | Logical value, representing whether the auto display property has been edited or not. |
LBL_OVR_INFO_POS_RETRY_EDITED | 43 | Logical value, representing whether the retry position property has been edited or not. |
LBL_OVR_INFO_LINE_PEN_EDITED | 44 | Logical value, representing whether the line pen property has been edited or not. |
LBL_OVR_INFO_PERCENT_OVER_EDITED | 45 | Logical value, representing whether the percentage property has been edited or not. |
LBL_OVR_INFO_AUTO_POSITION_EDITED | 46 | Logical value, representing whether the auto position has been edited or not. |
LBL_OVR_INFO_AUTO_SIZES_EDITED | 47 | Logical value, representing whether the auto sizes property has been edited or not. |
LBL_OVR_INFO_SUPPRESS_IF_NO_FIT_EDITED | 48 | Logical value, representing whether the suppress if not fit property has been edited or not. |
LBL_OVR_INFO_AUTO_SIZESTEP_EDITED | 49 | Logical value, representing whether the size step property has been edited or not. |
LBL_OVR_INFO_CURV_BEST_POS_EDITED | 50 | Logical value, representing whether the curved best position property has been edited or not. |
LBL_OVR_INFO_CURV_FALLBACK_EDITED | 51 | Logical value, representing whether the curved fallback property has been edited or not. |
LBL_OVR_INFO_USE_ABBREV_EDITED | 52 | Logical value, representing whether the use abbreviations property has been edited or not. |
LBL_OVR_INFO_ABBREV_EXPR_EDITED | 53 | Logical value, representing whether the abbreviated expression property has been edited or not. |
LBL_OVR_INFO_AUTO_CALLOUT_EDITED | 54 | Logical value, representing whether the auto callout property has been edited or not. |
Example
LabelOverrideInfo(nMID, nLayer, nOverride, LBL_OVR_INFO_ORIENTATION)
See Also:
StyleOverrideInfo() function, LayerStyleInfo() function, Set Map statement, LayerInfo() function