Class IWMap

This is the main class of the mapsuite javascript API.


Constructor Summary
IWMap(mapContainer)
            Creates a new map in the container element with the specified id.
 
Method Summary
 void addLayer(layer)
           Adds a new layer or group of layers to the map.
 void addWindowOverlay(windowOverlay)
           Adds a new window overlay in front of the map.
 void changeStyle(style)
           Changes the style of the current mapType.
 void createPrintMap()
           Creates the print image for the visible map area.
getBackdrop()
           undocumented
 IWBounds getBounds()
           Returns the coordinate bounds of the currently visible part of the map.
 number getBoundsZoomlevel(bounds)
           Returns the minimum zoom level at which the specified coordinate bounds fit in the map.
 IWCoordinate getCenter()
           Returns the center coordinate of the map.
 HTMLDivElement getClippingContainer()
           Returns the clipping container of the map.
 HTMLDivElement getContainer()
           Returns the map container.
 HTMLDivElement getControlContainer()
           Returns the map container for the controls.
 IWCopyrightControl getCopyrightControl()
           Returns the copyright control for this map.
 IWMapType getCurrentMapType()
           Returns the current map type.
 HTMLDivElement getDrawingContainer()
           Returns the drawing container for SVG and VML.
 IWLayerInterface getLayerByLayerName(layerName)
           Returns a layer by its layer name.

Example: If you have created a layer like this:
var layer = new IWLayer(map, 'My Route', 'ROUTE');
map.addLayer(layer);
you can obtain it by map.getLayerByName('ROUTE')
 IWLayerInterface getLayerByTitle(title)
           Returns a layer by its title.

Example: If you have created a layer like this:
var layer = new IWLayer(map, 'My Route', 'ROUTE');
map.addLayer(layer);
you can obtain it by map.getLayerByName('My Route')
 IWLayerInfoManager getLayerInfoManager()
           Returns the layer info manager for the map.
 IWLayerInterface[] getLayers()
           Returns all layers.
 IWLayoutManager getLayoutManager()
           Returns the layout manager for the map.
 number getMapHeightInMeter()
           Returns the height of the visible map area in meter.
 number getMapWidthInMeter()
           Returns the width of the visible map area in meter.
 number getMeterPerPixel()
           Returns the meter per pixel.
 IWMapOptions getOptions()
           Returns the options used by this map.
 HTMLDivElement getOverlayContainer()
           Returns the map container for the overlays.
 IWOverlayManager getOverlayManager()
           Returns the overlay manager for the map.
getSerialId()
           undocumented
 String getSessionId()
           Returns the id for the current session.
 HTMLDivElement getTilesContainer()
           Returns the tile container for the map tiles.
 HTMLDivElement getWindowOverlayContainer()
           Returns the WindowOverlay container of the map.
 IWWindowOverlayManager getWindowOverlayManager()
           Returns the WindowOverlayManager
 number getZoom()
           Returns the current zoom level.
 number getZoomByMeter(meter, mapType)
           Returns the optimal zoomlevel by meter.
 HTMLDivElement getZoomingAndDraggingContainer()
           Returns the ZoomingAndDragging container of the map.
 void openInfoBalloon(coordinate, content)
           Opens a new infoballoon at the specified coordinate on the map.
 IWWindowOverlay openTooltip(coordinate, text, properties)
           Opens a new IWTooltip at the specified coordinate on the map.
 void panBy(offset, undoable)
           Moves the map by the specified offset in pixels. If the target coordinate is already visible the map is moved in a smooth animation.
 void panTo(coordinate, undoable)
           Moves the map to the specified coordinate. If the target coordinate is already visible the map is moved in a smooth animation; otherwise the result is the same as from a call to {@link #setCenter} without the optional parameters.
readObject(json)
           undocumented
 void redo()
           If the last user action was a call to {@link #undo} the effect is cancelled; otherwise nothing is done.
 void redraw()
           Redraws the layers on the map.
refreshTiles()
           undocumented
 void removeInfoBalloon()
           Removes the infoballoon from the map.
 void removeLayer(layer)
           Removes the layer from the map.
 IWLayerInterface removeLayerByName(layerName)
           Removes the layer from the map by its name.
 void removeTooltip()
           Removes the IWTooltip from the map.
 void removeWindowOverlay(windowOverlay)
           Removes the window overlay from the map.
 void returnToSavedPosition()
           Restores the last saved map view.
 void savePosition()
           Saves the current map view (the map position and zoom level).
 void setCenter(coordinate, zoom, mapType)
           Sets the map center to the specified coordinate.
 void setRemovalStrategy(strategy)
           Sets a removal strategy.
simulateClick(event)
           undocumented
 String toString()
           Returns a string prepresentation of this map.
triggerOnMapStyleChange(event)
           The onmapstylechange event is fired when the style of current maptype is changed.

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

 void undo()
           Reverts the effect of the last user action if there is one on the stack.
writeObject()
           undocumented
 boolean zoom(level, center, adjustToCenter, animation)
           Zooms the map to the specified level and screen position. There are two zoom modes which can be toggled by adjustToCenter. adjustToCenter is true the map center after zooming is the coordinate at the center parameter. This is used for double click actions in the map to center the map on this position. If adjustToCenter is false the coordinate at the center parameter stays on the same screen position. This behavior is used for mouse wheel zooming: A city at the mouse position is still at the mouse position after zooming.
 boolean zoomIn(undoable)
           Zooms in a level unless the map is on the highest zoom level.
 boolean zoomOut(undoable)
           Zooms out a level unless the map is on the lowest zoom level.
 
Event Summary
 void dblclick(event)
           The ondblclick event is fired when the user double clicks with the mouse.

Register an event listener with IWEventManager.addListener(yourMapObject, 'ondblclick', yourHandlerMethod(event)); to receive the IWMouseEvent.

 void triggerOnAddLayer(event)
           The addlayer event is fired when a layer is added to the map.

The event has a single property named layer (containing the IWLayerInterface object).

Register an event listener with IWEventManager.addListener(yourMap, 'onaddlayer', yourHandlerMethod(event)); to receive this event.

 void triggerOnCenter(event)
           The onCenter event is fired after the map has been centered.

Register an event listener with IWEventManager.addListener(yourMapObject, 'oncenter', yourHandlerMethod(event)); to receive the IWMapCenterEvent.

 void triggerOnClick(event)
           The onclick event is fired when the mouse button is clicked.

Register an event listener with IWEventManager.addListener(yourMapObject, 'onclick', yourHandlerMethod(event)); to receive the IWMouseEvent.

 void triggerOnCopyrightChange(event)
           The onCopyrightChange event is fired after the copyright text has been changed.

Register an event listener with IWEventManager.addListener(yourMapObject, 'oncopyrightchange', yourHandlerMethod(event)); to receive the IWCoyprightChangedEvent.

 void triggerOnInitialize(event)
           The initialize event is fired when the map has been loaded the first time.

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

 void triggerOnLanguageChange(event)
           The onLanguageChange event is fired after the language has been changed.

Register an event listener with IWEventManager.addListener(yourMapObject, 'onlanguagechange', yourHandlerMethod(event)); to receive the IWLanguageChangeEvent.

 void triggerOnMapControlChange(event)
           The onMapControlChange event is fired after the map control has been changed.

Register an event listener with IWEventManager.addListener(yourMapObject, 'onmapcontrolchange', yourHandlerMethod(event)); to receive the IWMapControlChangeEvent.

 void triggerOnMapTypeAvailabilityChange(event)
           The onMapTypeAvailabilityChange event is fired after the availability of a map type has been changed.

Register an event listener with IWEventManager.addListener(yourMapObject, 'onmaptypeavailabilitychange', yourHandlerMethod(event)); to receive the IWMapTypesChangeEvent.

 void triggerOnMapTypeChange(event)
           The onMapTypeChange event is fired after the map type has been changed.

Register an event listener with IWEventManager.addListener(yourMapObject, 'onmaptypechange', yourHandlerMethod(event)); to receive the IWMapTypeChangeEvent.

 void triggerOnMapTypeChangeStart(event)
           The onMapTypeChangeStart event is fired before the map type changed.

Register an event listener with IWEventManager.addListener(yourMapObject, 'onmaptypechangestart', yourHandlerMethod(event)); to receive the IWMapTypeChangeEvent.

 void triggerOnMapTypesChange(event)
           The onMapTypesChange event is fired after the map types have been changed.

Register an event listener with IWEventManager.addListener(yourMapObject, 'onmaptypeschange', yourHandlerMethod(event)); to receive the IWMapTypesChangeEvent.

 void triggerOnMouseDown(event)
           The onMouseDown event is fired when the mouse button is pressed.

Register an event listener with IWEventManager.addListener(yourMapObject, 'onmousedown', yourHandlerMethod(event)); to receive the IWMouseEvent.

 void triggerOnMouseStop(event)
           The onMouseStop event is fired when the mouse has been stopped.

Register an event listener with IWEventManager.addListener(yourMapObject, 'onmousestop', yourHandlerMethod(event)); to receive the IWMouseEvent.

 void triggerOnMouseUp(event)
           The onMouseUp event is fired when the mouse button is released.

Register an event listener with IWEventManager.addListener(yourMapObject, 'onmouseup', yourHandlerMethod(event)); to receive the IWMouseEvent.

 void triggerOnMove(event)
           The onMove event is continuously fired while the map is moved around.

Register an event listener with IWEventManager.addListener(yourMapObject, 'onmove', yourHandlerMethod(event)); to receive the IWMoveEvent.

 void triggerOnMoveEnd(event)
           The onMoveEnd event is fired when the map has been moved.

Register an event listener with IWEventManager.addListener(yourMapObject, 'onmoveend', yourHandlerMethod(event)); to receive the IWMoveEvent.

 void triggerOnMoveStart(event)
           The onMoveStart event is fired before the map is moved.

Register an event listener with IWEventManager.addListener(yourMapObject, 'onmovestart', yourHandlerMethod(event)); to receive the event object.

 void triggerOnOverlayInvisible()
           The onoverlayinvisible event is fired when the overlays are not rendered because of e.g.

Register an event listener with IWEventManager.addListener(yourMap, 'onoverlayinvisible', yourHandlerMethod(event)); to receive this event.

 void triggerOnOverlayVisible()
           The onoverlayvisible event is fired when the overlays are rendered visible because there is a valid projection and no optical zoom in progress.

Register an event listener with IWEventManager.addListener(yourMap, 'onoverlayvisible', yourHandlerMethod(event)); to receive this event.

 void triggerOnProjectionInitialize(event)
           The onProjectionInitialize event is fired after the projection for the current map type has been initialized.

Register an event listener with IWEventManager.addListener(yourMapObject, 'onprojectioninitialize', yourHandlerMethod(event)); to receive this event.

 void triggerOnProjectionInvalid()
           The onProjectionInvalid event is fired before the projection for the current map type is loaded.

Register an event listener with IWEventManager.addListener(yourMapObject, 'onprojectioninvalid', yourHandlerMethod(event)); to receive this event.

 void triggerOnRemoveLayer(event)
           The removelayer event is fired when a layer is removed from the map.

The event has a single property named layer (containing the IWLayerInterface object).

Register an event listener with IWEventManager.addListener(yourMap, 'onremovelayer', yourHandlerMethod(event)); to receive this event.

 void triggerOnResize(event)
           The onResize event is fired after the map has been resized.

Register an event listener with IWEventManager.addListener(yourMapObject, 'onresize', yourHandlerMethod(event)); to receive this event.

 void triggerOnZoom(event)
           The onZoom event is fired after the new zoomlevel has been calculated.

Register an event listener with IWEventManager.addListener(yourMapObject, 'onzoom', yourHandlerMethod(event)); to receive the IWZoomEvent.

 void triggerOnZoomEnd(event)
           The onZoomEnd event is fired after the map has been zoomed.

Register an event listener with IWEventManager.addListener(yourMapObject, 'onzoomend', yourHandlerMethod(event)); to receive the IWZoomEvent.

 void triggerOnZoomStart()
           The onZoomStart event is fired before the map is zoomed.

Register an event listener with IWEventManager.addListener(yourMapObject, 'onzoomstart', yourHandlerMethod(event)); to receive the IWZoomEvent.

 
Constructor Detail

IWMap

IWMap(mapContainer)

Method Detail

addLayer

void addLayer(layer)

addWindowOverlay

void addWindowOverlay(windowOverlay)

changeStyle

void changeStyle(style)

createPrintMap

void createPrintMap()

getBackdrop

getBackdrop()

getBounds

IWBounds getBounds()

getBoundsZoomlevel

number getBoundsZoomlevel(bounds)

getCenter

IWCoordinate getCenter()

getClippingContainer

HTMLDivElement getClippingContainer()

getContainer

HTMLDivElement getContainer()

getControlContainer

HTMLDivElement getControlContainer()

getCopyrightControl

IWCopyrightControl getCopyrightControl()

getCurrentMapType

IWMapType getCurrentMapType()

getDrawingContainer

HTMLDivElement getDrawingContainer()

getLayerByLayerName

IWLayerInterface getLayerByLayerName(layerName)

getLayerByTitle

IWLayerInterface getLayerByTitle(title)

getLayerInfoManager

IWLayerInfoManager getLayerInfoManager()

getLayers

IWLayerInterface[] getLayers()

getLayoutManager

IWLayoutManager getLayoutManager()

getMapHeightInMeter

number getMapHeightInMeter()

getMapWidthInMeter

number getMapWidthInMeter()

getMeterPerPixel

number getMeterPerPixel()

getOptions

IWMapOptions getOptions()

getOverlayContainer

HTMLDivElement getOverlayContainer()

getOverlayManager

IWOverlayManager getOverlayManager()

getSerialId

getSerialId()

getSessionId

String getSessionId()

getTilesContainer

HTMLDivElement getTilesContainer()

getWindowOverlayContainer

HTMLDivElement getWindowOverlayContainer()

getWindowOverlayManager

IWWindowOverlayManager getWindowOverlayManager()

getZoom

number getZoom()

getZoomByMeter

number getZoomByMeter(meter, mapType)

getZoomingAndDraggingContainer

HTMLDivElement getZoomingAndDraggingContainer()

openInfoBalloon

void openInfoBalloon(coordinate, content)

openTooltip

IWWindowOverlay openTooltip(coordinate, text, properties)

panBy

void panBy(offset, undoable)

panTo

void panTo(coordinate, undoable)

readObject

readObject(json)

redo

void redo()

redraw

void redraw()

refreshTiles

refreshTiles()

removeInfoBalloon

void removeInfoBalloon()

removeLayer

void removeLayer(layer)

removeLayerByName

IWLayerInterface removeLayerByName(layerName)

removeTooltip

void removeTooltip()

removeWindowOverlay

void removeWindowOverlay(windowOverlay)

returnToSavedPosition

void returnToSavedPosition()

savePosition

void savePosition()

setCenter

void setCenter(coordinate, zoom, mapType)

setRemovalStrategy

void setRemovalStrategy(strategy)

simulateClick

simulateClick(event)

toString

String toString()

triggerOnMapStyleChange

triggerOnMapStyleChange(event)

undo

void undo()

writeObject

writeObject()

zoom

boolean zoom(level, center, adjustToCenter, animation)

zoomIn

boolean zoomIn(undoable)

zoomOut

boolean zoomOut(undoable)

Event Detail

dblclick

void dblclick(event)

triggerOnAddLayer

void triggerOnAddLayer(event)

triggerOnCenter

void triggerOnCenter(event)

triggerOnClick

void triggerOnClick(event)

triggerOnCopyrightChange

void triggerOnCopyrightChange(event)

triggerOnInitialize

void triggerOnInitialize(event)

triggerOnLanguageChange

void triggerOnLanguageChange(event)

triggerOnMapControlChange

void triggerOnMapControlChange(event)

triggerOnMapTypeAvailabilityChange

void triggerOnMapTypeAvailabilityChange(event)

triggerOnMapTypeChange

void triggerOnMapTypeChange(event)

triggerOnMapTypeChangeStart

void triggerOnMapTypeChangeStart(event)

triggerOnMapTypesChange

void triggerOnMapTypesChange(event)

triggerOnMouseDown

void triggerOnMouseDown(event)

triggerOnMouseStop

void triggerOnMouseStop(event)

triggerOnMouseUp

void triggerOnMouseUp(event)

triggerOnMove

void triggerOnMove(event)

triggerOnMoveEnd

void triggerOnMoveEnd(event)

triggerOnMoveStart

void triggerOnMoveStart(event)

triggerOnOverlayInvisible

void triggerOnOverlayInvisible()

triggerOnOverlayVisible

void triggerOnOverlayVisible()

triggerOnProjectionInitialize

void triggerOnProjectionInitialize(event)

triggerOnProjectionInvalid

void triggerOnProjectionInvalid()

triggerOnRemoveLayer

void triggerOnRemoveLayer(event)

triggerOnResize

void triggerOnResize(event)

triggerOnZoom

void triggerOnZoom(event)

triggerOnZoomEnd

void triggerOnZoomEnd(event)

triggerOnZoomStart

void triggerOnZoomStart()

Source-Code Copyright 2007-2016 infoware GmbH - Documentation generated on Tue Nov 29 2022 14:20:14 GMT+0100 (MEZ)