Class: IWMapElement

IWMapElement

An interface which has to be implemented by all map elements such as overlays and controls.

new IWMapElement(parent, options)

MapElement interface.
Parameters:
Name Type Description
parent HTMLDivElement
options object an object with the properties registerEvents (true|false) and events (an array of the events 'mouseup', 'mousedown', 'mousemove', 'mouseover', 'mouseout', 'click')

Methods


afterAppend()

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

afterRemove()

Callback method. This method will be called after the element has been removed from the DOM. Overwrite this method to react on this event.
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.
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.
Returns:
Type
void

destroyMapElement()

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

getContainer()

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

getId()

Returns the id for this element.
Returns:
Type
String

getParent()

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

isDisplayed()

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

isPrintable()

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

isVisible()

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

onClick(event)

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

onContextMenu(event)

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

onDblClick(event)

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

onMouseDown(event)

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

onMouseMove(event)

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

onMouseOut(event)

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

onMouseOver(event)

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

onMouseUp(event)

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

onMouseWheel(event)

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

setContainer(newContainer)

Sets the DIV container for this map element.
Parameters:
Name Type Description
newContainer HTMLDivElement
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

setId(id)

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

setParent()

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

setPrintable(printable)

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

setVisible(visible)

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