Purpose
Initializes an internal label pointer, so that you can query the first label in a map layer. You can call this function from the MapBasic window in MapInfo Pro.
Syntax
LabelFindFirst( map_window_id, layer_number, b_mapper )
map_window_id is an integer window id, identifying a Map window.
layer_number is the number of a layer in the current Map window (for example, 1 for the top layer).
b_mapper is a logical value. Specify TRUE to query the labels that appear when the Map is active; specify FALSE to query the labels that appear when the map is inside a Layout.
Return Value
Logical value: TRUE means that labels exist for the specified layer (either labels are currently visible, or the user has edited labels, and those edited labels are not currently visible).
Description
Call LabelFindFirst() when you want to loop through a map layer's labels to query the labels. Querying labels is a two-step process:
- Set MapBasic's internal label pointer by calling the LabelFindFirst() function, the LabelFindNext() function, or the LabelFindByID() function.
- If the function you called in step 1 did not return FALSE, you can query the current label by calling the LabelInfo() function.
To continue querying additional labels, return to step 1.
Example
For an example, see LabelInfo() function.
See Also:
LabelFindByID() function, LabelFindNext() function, LabelInfo() function