Applies, modifies, or deletes labels on a map.
applies an operation to all labels.
controls the label positioning and is a required argument.
specifies the text color.
specifies the label data set to which new labels are appended.
specifies the font used in the label.
replaces the existing label data set reference in a map when both DATASET= and MAP= are specified.
controls how an image label is drawn relative to map features.
specifies the location of an image to use as an image label on the map.
indicates the map entry on which to display the labels.
specifies a map scale at which the label is turned on off when the map view is zoomed.
specifies the distance to move the entire label.
specifies a map scale at which the label is turned on when the map view is zoomed.
specifies the horizontal and vertical coordinates for the label.
specifies how labels are treated when they overlap.
assigns a single label to a position on the map relative to the map's bounding box.
specifies the label in the data set to which the operation applies.
specifies the text for a literal label.
controls whether map features show though the label's bounding box.
creates a new label or labels. Unlike CREATE operations for other PROC GIS statements, duplicate labels are allowed.
Either DATASET= or MAP= is required or no deletions can occur.
Any DELETE operation that deletes all of the rows in the label data set also causes the data set to be deleted. If a data set is deleted, a NOTE is printed to the log. If MAP= is present and the label data set is deleted, the reference to the data set within the map entry is removed.
A note is printed in the log upon completion of a successful deletion.
Separate the list of options from the catalog entry name with a slash (/).
The label is attached to a location on the map. As you move the map in the window, the label moves with the map.
The label is attached to the map window. It remains fixed relative to the window as you move the map in the window.
is a SAS color-name (for example, GREEN or RED).
is an RGB color (for
example, CX23A76B
).
Default | BLACK. |
See | For more information about color-naming schemes, see “Specifying Colors in SAS/GRAPH Programs” in SAS/GRAPH: Reference. |
specifies the label data set to which new labels are appended. If the data set does not exist, it is created.
If you specify a one-level data set name, the WORK library is assumed. If you specify both DATASET= and MAP=, and the map already references a label data set, the data set names are compared. If they are not the same and FORCE was not specified, a warning is printed, and the run group is terminated.
specifies a font for the label text.
Default | If the specified font is not found when the map is opened, the default system font is substituted and a note is printed to the log. |
Example | font='Times New Roman-12pt-Roman-Bold' font='Display Manager font' font='Sasfont (10x15) 10pt-9.7pt-Roman-Normal' |
assigns the default font to the label.
replaces the existing label data set reference in a map when both DATASET= and MAP= are specified. If the map already references a label data set, its data set name is compared to the name specified with DATASET=. If they are not the same, the FORCE option causes the map's label data set reference to be overwritten and a note printed to the log. The map's original label data set is not deleted.
causes an image label to be drawn over the map features.
causes an image label to be drawn beneath the map features.
Default | FRONT |
Note | These options do not apply to text labels. |
specifies a host directory path to an image file.
Example | image='C:\My SAS Files\photo.gif' |
specifies an IMAGE type catalog entry for the image label. If you omit the library name from the statement, the WORK library is the default.
specifies an active SAS fileref that points to an external file for an image label. The host directory path for this fileref is written to the label data set, not to the fileref.
indicates the map entry on which to display the labels. If you specify a one-level name, the map entry is assumed to be in one of two catalogs. It will be the catalog that is specified in the PROC GIS statement or in the most recently issued CATALOG statement.
If the specified map entry already references a label data set, new labels are appended to that data set.
If the map entry does not reference a label data set, you must provide a label data set name with the DATASET= option. The labels are written to that data set, and the data set is then assigned to the specified map.
For the MAPLABEL statement, either MAP= or DATASET= is required. If both are present and the map already has a label data set, its name must match the name specified in the DATASET= option. One exception is if the FORCE option is also used. In that case, the label data set specified by DATASET= is assigned to the map entry. The map's original label data set is unassigned but not deleted.
is the number of units to move the label right (positive numbers) or left (negative numbers).
is the number of units to move the label up (positive numbers) or down (negative numbers).
is one of the following values:
specifies that the X and Y coordinate values are a percentage of the distance from the lower left corner of the map window to the label origin. When the window is resized, the label remains in the same relative location. For example, if both the X and Y coordinates are set to 50, then the label origin remains in the center of the window. Negative values and values greater than 100% are not allowed.
specifies that the X and Y coordinate values are screen coordinates using pixels. The lower left corner of the window is 0, 0. Negative values are not allowed. If a specified pixel value runs the label outside of the window, the label is shifted. The shift can be horizontal, vertical, or both so that the label is placed just within the window when the map is opened.
X and Y values are real-world coordinates based on the underlying spatial data. Negative values can be used to signify the western or southern hemispheres if the spatial data contains them.
offset = ( 10 real, )
To set both the X and Y offset, specify two values, with or without a comma separating them, as in the following example:
offset = ( 20 pct, 40 pct )
To set only the Y offset, specify one value preceded by a comma, as in the following example:
offset = ( ,-30 pct )
OFFSET= is usually used in conjunction with POSITION= to adjust the position of a label. Moves are relative to the location specified by POSITION=, with OFFSET=(0,0) representing the initial position. You can also apply OFFSET= to the default label position.
The following restrictions apply to the OFFSET= argument:
specifies the map scale value at which the label is turned on.
specifies the units for the scale value.
enables you to specify various combinations of units. Valid values are KM, M, CM, MI, FT, and IN. Real-units is typically KM, M, MI, or FT, and map-units is usually either CM or IN. Long forms of the unit names (for example, KILOMETERS or INCH (singular or plural), are also acceptable).
sets the scale units to KM/CM (kilometers per centimeter).
sets the scale units to MI/IN (miles per inch).
Default | METRIC |
specifies the map scale value at which the label is turned off.
specifies the units for OFFSCALE.
enables you to specify various combinations of units. Valid values are KM, M, CM, MI, FT, and IN. Real-units is typically KM, M, MI, or FT, and map-units is usually either CM or IN. Long forms of the unit names (for example, KILOMETERS or INCH (singular or plural), are also acceptable).
sets the scale units to KM/CM (kilometers per centimeter).
sets the scale units to MI/IN (miles per inch).
Default | METRIC |
specifies the X coordinate (horizontal axis)
specifies the Y coordinate (vertical axis)
can be one of the following values:
specifies that the X and Y coordinate values are a percentage of the distance from the lower left corner of the map window to the label origin. When the window is resized, the label remains in the same relative location. For example, if both the X and Y coordinates are set to 50, then the label origin remains in the center of the window. Negative values and values greater than 100% are not allowed.
specifies that the X and Y coordinate values are screen coordinates using pixels. The lower left corner of the window is 0, 0. Negative values are not allowed. If a specified pixel value runs the label outside of the window, the label is shifted. The label shifts horizontally, vertically, or both to be just within the window when the map is opened.
X and Y values are real-world coordinates based on the underlying spatial data. Negative values can be used to signify the western or southern hemispheres if the spatial data contains them.
To set only the X coordinate, specify one value with or without a following comma, as in the following examples:
origin=(10 pixels,) origin=(10 pixels)
To set both the X and Y coordinates, specify two values with or without a comma separating them. The units can be specified for both X and Y or once at the end, as in the following examples:
origin=(10 pct, 40 pct) origin=(10 pct 40 pct) origin=(10 40 pct) origin=(10, 40, pct)
To set only the Y coordinate, specify one value preceded by a comma, as in the following example:
origin=(, 20 pct)
ORIGIN= overrides the POSITION= option if both options are present. Although using the OFFSET= option with the ORIGIN= option is unnecessary, if you also specify OFFSET=, it is applied after the ORIGIN= request has been processed.
If the specified origin or origin plus offset is outside of the overall map bounding box, a warning is printed to the log. No warning is issued if the label runs out of the box, however.
All labels that you create with the option will be displayed even if they conflict with other labels.
Some of the conflicting labels will be suppressed until you zoom in more closely.
Default | NOOVERLAP |
The following arguments determine the vertical position of the label:
places the label along the upper edge of the map or window.
places the label halfway between the top and bottom edges of the map or window.
aligns the label with the bottom edge of the map or window.
The following arguments determine the horizontal position of the label:
starts the label at the left edge of the map or window.
places the label halfway between the left and right edges of the map or window.
aligns the end of the label with the right edge of the map or window. The label is centered horizontally and vertically at the computed position point. You can adjust the initial label position with the OFFSET= option.
specifies the text for a literal label. For REPLACE, UPDATE, DELETE or CONTENTS operations, string specifies a search string used to locate a specific target label. When TEXT='string' is used to search for a label, string is case sensitive, and an exact match to the value of the search string must be found. For example, TEXT='Paris' will ignore a label having PARIS as its text. It will also ignore a label having 'Paris Metro' as its text.
If ROW= and TEXT= are both present in a REPLACE or UPDATE statement the 'string' entered with TEXT= is not a search string. It becomes the new text for the label at the specified ROW number.
enables the map features to show though the label's bounding box.
Default | TRANSPARENT |