Class: IWWindowOverlayManager

IWWindowOverlayManager

Used by IWMap to manage info balloons and tooltips.

new IWWindowOverlayManager()

This class manages the references for window overlays like info balloons and tooltips.

Methods


addWindowOverlay(windowOverlay)

Adds a new window overlay to the map.
Parameters:
Name Type Description
windowOverlay IWWindowOverlay the window overlay
Returns:
Type
void

getAllWindowOverlays()

Returns all window overlays of the map.
Returns:
Type
Array.<IWWindowOverlay>

openInfoBalloon(coordinate, content)

Creates an info balloon on the map, replacing the old one if present. This is a convenience function which can be used instead of checking if there already is an info balloon, closing it, creating a new one and placing that on the map by yourself.
Parameters:
Name Type Description
coordinate IWCoordinate the coordinate of the info balloon
content object a HTMLElement or a (HTML formatted) string to display in the info balloon
Returns:
the new info balloon
Type
IWWindowOverlay

openTooltip(coordinate, text, properties)

Creates a tooltip on the map, replacing the old one if present. This is a convenience function which can be used instead of checking if there already is a tooltip, closing it, creating a new one and placing that on the map by yourself.
Parameters:
Name Type Description
coordinate IWCoordinate the coordinate of the tooltip
text String the content of the tooltip
properties Object properties for this tooltip, so far only duration (in ms)
Returns:
the new tooltip
Type
IWWindowOverlay

removeInfoBalloon()

Removes the visible info balloon from the map if there is one created by openInfoBalloon().
Returns:
Type
void

removeTooltip()

Removes the visible tooltip from the map if there is one created by openTooltip().
Returns:
Type
void

removeWindowOverlay(windowOverlay)

Removes a window overlay from the map.
Parameters:
Name Type Description
windowOverlay IWWindowOverlay the window overlay to remove
Returns:
Type
void

setInfoBalloonClass(a)

Sets a custom class to be used as info balloon implementation. All calls to openInfoBalloon() will use this constructor. If not set, IWInfoBalloon will be used by default.
Parameters:
Name Type Description
a function constructor function implementing IWWindowOverlay
Returns:
Type
void

setTooltipClass(a)

Sets a custom class to be used as tooltip implementation. All calls to openTooltip() will use this constructor. If not set, IWTooltip will be used by default.
Parameters:
Name Type Description
a function constructor function implementing IWWindowOverlay
Returns:
Type
void