Class: IWInfoBalloon

IWInfoBalloon

IWInfoBalloon is an example implementation of the IWWindowOverlay interface. IWInfoBalloon can be used to display informations in front of the map.

new IWInfoBalloon(map, coordinate, content)

Creates a new window object.
Parameters:
Name Type Description
map IWMap
coordinate IWCoordinate
content Object DOMElement or String
Since:
  • 0.66

Extends

Methods


<static> setMaxSize(size)

Sets the maximum size for all info balloons.
Parameters:
Name Type Description
size IWSize the maximum size to use
Returns:
Type
void

<static> setMinSize(size)

Sets the minimum size for all info balloons.
Parameters:
Name Type Description
size IWSize the minimum size to use
Returns:
Type
void

afterAppend()

We use the callback method for positioning the map and displaying the info balloon.
Overrides:
Returns:
Type
void

afterRemove()

Removes listeners, mutation observer etc.
Overrides:
Returns:
Type
void

beforeAppend()

Callback method. This method will be called before the element has been added to the DOM. Overwrite this method to react on this event.
Inherited From:
Returns:
Type
void

beforeRemove()

Callback method. This method will be called before the element has been removed from the DOM. Overwrite this method to react on this event.
Inherited From:
Returns:
Type
void

destroy()

Destroys the info balloon. Releases all DOM references and event listeners. Call this method after the info balloon has been removed from the map by calling the removeWindowOverlay method.
Returns:
Type
void

destroyMapElement()

Releases all event listeners from the container.
Inherited From:
Returns:
Type
void

destroyWindowOverlay()

Destroys the window overlay. Releases all DOM references and event listeners.
Inherited From:
Returns:
Type
void

getAnchor()

Returns the anchor of the window overlay.
Inherited From:
Returns:
Type
IWPoint

getCloseImage()

Deprecated and only present for backwards compatibility.
Returns:
Type
String

getContainer()

Returns the DIV container for this map element.
Inherited From:
Returns:
the container
Type
HTMLDivElement

getContent()

Returns the content of the infoballoon.
Returns:
Type
Object

getCoordinate()

Returns the coordinate for this window overlay.
Inherited From:
Returns:
Type
IWCoordinate

getId()

Returns the id for this element.
Inherited From:
Returns:
Type
String

getParent()

Returns the parent container for this element.
Inherited From:
Returns:
parent
Type
HTMLDivElement

getSize()

Returns the size of the info balloon.
Returns:
Type
IWSize

isDisplayed()

Checks if the element has been added to the DOM tree.
Inherited From:
Returns:
Type
boolean

isPrintable()

Returns true if the element is printable otherwise false.
Inherited From:
Returns:
Type
boolean

isVisible()

Returns true if the container is visible, otherwise false.
Inherited From:
Returns:
true if this container is visible
Type
boolean

onClick(event)

Callback method for onclick events.
Parameters:
Name Type Description
event Event
Inherited From:
Returns:
Type
void

onContextMenu(event)

Callback method for oncontextmenu events.
Parameters:
Name Type Description
event Event
Inherited From:
Returns:
Type
void

onDblClick(event)

Callback method for ondblclick events.
Parameters:
Name Type Description
event Event
Inherited From:
Returns:
Type
void

onMouseDown(event)

Callback method for onmousedown events.
Parameters:
Name Type Description
event Event
Inherited From:
Returns:
Type
void

onMouseMove(event)

Callback method for onmousemove events.
Parameters:
Name Type Description
event Event
Inherited From:
Returns:
Type
void

onMouseOut(event)

Callback method for onmouseout events.
Parameters:
Name Type Description
event Event
Inherited From:
Returns:
Type
void

onMouseOver(event)

Callback method for onmouseover events.
Parameters:
Name Type Description
event Event
Inherited From:
Returns:
Type
void

onMouseUp(event)

Callback method for onmouseup events.
Parameters:
Name Type Description
event Event
Inherited From:
Returns:
Type
void

onMouseWheel(event)

Callback method for onmousewheel events.
Parameters:
Name Type Description
event Event
Inherited From:
Returns:
Type
void

redraw()

Redraws the window overlay. Calculates and sets the new pixel position where the window overlay appears on the map.
Inherited From:
Returns:
Type
void

setAnchor(anchor)

Sets the anchor of the window overlay.
Parameters:
Name Type Description
anchor IWPoint
Inherited From:
Returns:
Type
void

setAutoPan(panMapBool)

If the whole popup should be visible in the map-viewport after appending, set "true". If not, set "false". Then it's possible that the popup intersects the map-viewport-bounds. Default is "true".
Parameters:
Name Type Description
panMapBool boolean
Returns:
Type
void

setCloseImage(imagePath)

Deprecated and only present for backwards compatibility.
Parameters:
Name Type Description
imagePath String
Returns:
Type
void

setContainer(newContainer)

Sets the DIV container for this map element.
Parameters:
Name Type Description
newContainer HTMLDivElement
Inherited From:
Returns:
Type
void

setContainerClassname(classname)

Sets the classname of the container. Only use this method to modify the containers classname because it preserves the classname set by setPrintable(false).
Parameters:
Name Type Description
classname
Inherited From:

setContent(newContent)

Sets the content of the infoballoon.
Parameters:
Name Type Description
newContent Object the new content of the infoballoon
Returns:
Type
void

setCoordinate(coordinate)

Sets the coordinate for this window overlay.
Parameters:
Name Type Description
coordinate IWCoordinate
Inherited From:
Returns:
Type
void

setId(id)

Sets the id for this element.
Parameters:
Name Type Description
id String
Inherited From:
Returns:
Type
void

setParent()

Sets the parent container for this element.
Inherited From:
Returns:
newParent
Type
HTMLDivElement

setPrintable(printable)

Enables or disables the element for printing.
Parameters:
Name Type Description
printable boolean
Inherited From:
Returns:
Type
void

setSize(newSize)

Resizes the balloon to the specified size.
Parameters:
Name Type Description
newSize IWSize the new size of the infoballoon
Returns:
Type
void

setVisible(visible)

Sets the visibility of this control to visible or hidden.
Parameters:
Name Type Description
visible boolean
Inherited From:
Returns:
Type
void

toString()

Returns a string representation of this info balloon.
Returns:
Type
String