arrow-left

All pages
gitbookPowered by GitBook
1 of 1

Loading...

LegendItem


A legend item, which often represents a sub-class of features in a layer in the case of categorical or classed layers.

hashtag
Properties

hashtag
title

title: string | string[]

The title of the legend item.


hashtag
titleDependsOnZoom

titleDependsOnZoom: boolean

Whether the title depends on the zoom level or not. If it does, you need to call when the zoom level changes.

Note that as the zoom level changes, the handler will not be called, so you need to call yourself.


hashtag
visible

visible: boolean

Whether the legend item is visible or not.


hashtag
id

id: string

The id of the legend item.


hashtag
layerId

layerId: string

The id of the layer the legend item belongs to.

`getLegendItem`
`onLegendItemChange`
`getLegendItem`