portal_highlighter

These functions handle portal highlighters

Methods

inner addPortalHighlighter(name, data)

Adds a new portal highlighter to map. The highlighter is a function that will be called for each portal.

Parameters:
Name Type Description
name string

The name of the highlighter.

data function

The callback function for the highlighter. This function receives data about the portal and decides how to highlight it.

inner changePortalHighlights(name)

Changes the current portal highlights based on the selected highlighter.

Parameters:
Name Type Description
name string

The name of the highlighter to be applied.

inner highlightPortal(p)

Applies the currently active highlighter to a specific portal. This function is typically called for each portal on the map.

Parameters:
Name Type Description
p Object

The portal object to be highlighted.

inner resetHighlightedPortals()

Resets the highlighting of all portals, returning them to their default style.

inner updatePortalHighlighterControl()

Updates the portal highlighter dropdown list, recreating the dropdown list of available highlighters.