Module

markerService

Methods

# static composeId(id, isHidden) → {boolean}

Based on the visibility of an element, determine the suffix of the html-id. This is needed since some elements have variable height based on their content, thus if that height is to be used in a calculation it has to be read from an already rendered html element. This function provides the id for the visible and hidden variant of such an element.

Parameters:
Name Type Description
id string

Identifier for the HTML element

isHidden boolean

Determines if the element is a visible component

View Source services/markerService.js, line 96

data required to determine the style of a Hoverbox component

boolean

# static getElementPositionData(elementId) → {Object}

Function returns the positions of a HTML element in relation to the viewport

Parameters:
Name Type Description
elementId string

Identifier for the HTML element

View Source services/markerService.js, line 15

positionalData

Object

# static getHoverBoxStyleData(isHidden, placeId) → {Object}

Compares the viewport position data of the map marker identified by the placeId parameter with the map itself. This allows the function to determine in which quadrant of the map the HoverBox will appear, and hence can determine at which side (left/right, top/bottom) it is to be rendered to avoid the HoverBox from clipping outside of the map component.

Parameters:
Name Type Description
isHidden boolean

Determines if the element is a visible component

placeId string

Identifier for the HTML element

View Source services/markerService.js, line 37

data required to determine the style of a Hoverbox component

Object