Class: IWMultiControl

IWMultiControl

This class provides the MultiControl which implements maptype selection, label selection, POI selection by a menu, displaying the measuring tool and toggle printing.

This class is part of the module multicontrol.

This class requires the modules graphics and poi. See the section about modules in the FAQ for details.


new IWMultiControl(map, defaultMapTypeName, options)

Creates the MultiControl for providing map type selection, label selection, POI selection, measuring tool and printing.
Parameters:
Name Type Description
map IWMap the map which is controlled by this overview map
defaultMapTypeName String the maptype that should be used for the overview map
options the configuration of the MultiControl which overwrites the default configuration
Since:
  • 1.1

Extends

Methods


afterAppend()

Creates the GUI and adds the control to the DOM
Overrides:
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.
Inherited From:
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

destroyMapElement()

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

getContainer()

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

getFirstOrientation()

Returns the first orientation of this control.
Inherited From:
Returns:
Type
IWAlignment

getId()

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

getMap()

Returns the base map.
Returns:
the map
Type
IWMap

getMultiControlMap()

Returns the multi control map.
Returns:
the overview map
Type
IWMap

getName()

Returns the name of this control.
Inherited From:
Returns:
Type
String

getPadding()

Returns the padding for this control.
Inherited From:
Returns:
the padding for this control
Type
IWSize

getParent()

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

getRenderingAttributes()

Returns the attributes to render the map extent.
Returns:
Type
Object

getSecondOrientation()

Returns the second orientation of the control.
Inherited From:
Returns:
Type
IWAlignment

getSizeOfMap()

Returns the size of the multi control map in pixel.
Returns:
the size of the multi control map in pixel
Type
IWSize

isControl()

Function for IWLayoutManager to check if this interface is implemented.
Inherited From:
Returns:
true
Type
boolean

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

isRedrawable()

Returns whether the control will be redrawn by the layout manager or not.
Inherited From:
Returns:
redrawable
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

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:

setFirstOrientation(alignment)

Sets the first orientation of the control. Possible values are IWAlignment.CENTER, IWAlignment.TOP, IWAlignment.RIGHT, IWAlignment.BOTTOM and IWAlignment.LEFT.
Parameters:
Name Type Description
alignment IWAlignment the first orientation
Inherited From:
Returns:
Type
void

setId(id)

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

setPadding(newPadding)

Sets the padding for this control. A padding defines the space between the current control element and others.
Parameters:
Name Type Description
newPadding IWSize the padding for this control
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

setRedrawable(isRedrawable)

Defines if the control will be redrawn by the layout manager.
Parameters:
Name Type Description
isRedrawable boolean
Inherited From:
Returns:
Type
void

setRenderingAttributes(attributes)

Sets the attributes to render the the map extent as specified in IWMapRenderer.
Parameters:
Name Type Description
attributes
Returns:
Type
void

setSecondOrientation(alignment)

Sets the second orientation of the control. Possible values are IWAlignment.CENTER, IWAlignment.TOP, IWAlignment.RIGHT, IWAlignment.BOTTOM and IWAlignment.LEFT.
Parameters:
Name Type Description
alignment IWAlignment the secondary orientation
Inherited From:
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 control.
Inherited From:
Returns:
Type
String

triggerOnMapPreviewsInvisible()

The onmappreviewsinvisible event is fired if the previews were hidden

Register an event listener with IWEventManager.addListener(yourMultiControlObject, 'onmappreviewsinvisible', yourHandlerMethod(event)); to receive the event.


triggerOnMapPreviewsVisible()

The onmappreviewsvisible event is fired if the previews are shown by a mouseover over the overviewmap or a click on the maptype panel

Register an event listener with IWEventManager.addListener(yourMultiControlObject, 'onmappreviewsvisible', yourHandlerMethod(event)); to receive the event.


triggerOnMeasuringClose()

The onmeasuringclose event is fired after the measuring control was closed

Register an event listener with IWEventManager.addListener(yourMultiControlObject, 'onmeasuringclose', yourHandlerMethod(event)); to receive the event.


triggerOnMeasuringDistanceChanged()

The onmeasuringreset event is fired after the distance of the measuring item was set to 0.0

Register an event listener with IWEventManager.addListener(yourMultiControlObject, 'onmeasuringreset', yourHandlerMethod(event)); to receive the event.


triggerOnMeasuringOpen()

The onmeasuringopen event is fired after the measuring control is shown

Register an event listener with IWEventManager.addListener(yourMultiControlObject, 'onmeasuringopen', yourHandlerMethod(event)); to receive the event.


triggerOnMeasuringReset()

The onmeasuringreset event is fired after the distance of the measuring item was set to 0.0

Register an event listener with IWEventManager.addListener(yourMultiControlObject, 'onmeasuringreset', yourHandlerMethod(event)); to receive the event.


triggerOnMultiMenuClose()

The onmultimenuclose event is fired when the panel displaying the current maptype was clicked to close the menu.

Register an event listener with IWEventManager.addListener(yourMultiControlObject, 'onmultimenuclose', yourHandlerMethod(event)); to receive the event.


triggerOnMultiMenuOpen()

The onmultimenuopen event is fired when the panel displaying the current maptype was clicked

Register an event listener with IWEventManager.addListener(yourMultiControlObject, 'onmultimenuopen', yourHandlerMethod(event)); to receive the event.


triggerOnPoiLayerChange()

The onpoilayerchange event is fired if the visible layers of POIs change.

Register an event listener with IWEventManager.addListener(yourMultiControlObject, 'onpoilayerchange', yourHandlerMethod(event)); to receive the event.


triggerOnPoiMenu()

The onpoimenu event is fired when the POI menu is displayed.

Register an event listener with IWEventManager.addListener(yourMultiControlObject, 'onpoimenu', yourHandlerMethod(event)); to receive the event.


triggerOnPrintMenuItemClicked()

The onprintmenuitemclicked event is fired when the print menu item was clicked. The actions for the print menu item have to be implemented by the application. There's no action executed by the MultiControl.

Register an event listener with IWEventManager.addListener(yourMultiControlObject, 'onprintmenuitemclicked', yourHandlerMethod(event)); to receive the event.


triggerOnTrafficToggle()

The ontraffictoggle event is fired if the traffic is switched on or off.

Register an event listener with IWEventManager.addListener(yourMultiControlObject, 'ontraffictoggle', yourHandlerMethod(event)); to receive the event.