Not all layers support the legendEnabled property. To avoid casts to any, we could cast to this interface, when accessing it.

interface LayerWithLegendEnabledProperty {
    legendEnabled: boolean;
}

Hierarchy

  • default
    • LayerWithLegendEnabledProperty

Properties

Properties

legendEnabled: boolean

Indicates whether the layer will be included in the legend.