require(["esri/tasks/LegendLayer"], function(LegendLayer) { /* code goes here */ });
Description
(Added at v3.0)
Define layer properties for the legend layers associated with a
PrintTemplate.
Samples
Search for
samples that use this class.
Constructors
Properties
layerId | String | The id of the operational layer to include in the printout's legend. |
subLayerIds | String[] | The ids of the sublayers to include in the printout's legend. |
Constructor Details
Creates a new LegendLayer object.
Sample:
require([
"esri/tasks/LegendLayer", ...
], function(LegendLayer, ... ) {
var legendLayer = new LegendLayer();
...
});
Property Details
The id of the operational layer to include in the printout's legend.
Sample:
legendLayer.layerId = "Boundaries";
The ids of the sublayers to include in the printout's legend.
Sample:
legendLayer.subLayerIds = [0, 5];