Class: GoCustomLegend

GoCustomLegend

This class manages custom legends for a specific map, replacing default legends with custom HTML elements.

new GoCustomLegend()

Toc/CustomLegend.ts, line 3

Methods

getCustomElement(){HTMLDivElement}

Toc/CustomLegend.ts, line 63

Retrieves the custom HTML element used as the legend.

Returns:
Type Description
HTMLDivElement The custom legend HTML element.

getTocID(){string}

Toc/CustomLegend.ts, line 54

Retrieves the TOC ID associated with the custom legend.

Returns:
Type Description
string The TOC ID.

GoCustomLegend

new GoCustomLegend(map, mapID, customElement)

Toc/CustomLegend.ts, line 23

Initializes the GoCustomLegend instance with a map, map ID, and a custom HTML element.

Name Type Description
map GoMap

The map instance where the legend will be replaced.

mapID string

The ID of the map associated with the legend.

customElement HTMLDivElement

The custom HTML element to use as the legend.

Methods

getCustomElement(){HTMLDivElement}

Toc/CustomLegend.ts, line 63

Retrieves the custom HTML element used as the legend.

Returns:
Type Description
HTMLDivElement The custom legend HTML element.

getTocID(){string}

Toc/CustomLegend.ts, line 54

Retrieves the TOC ID associated with the custom legend.

Returns:
Type Description
string The TOC ID.