SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This is the main class in the mapsuite javascript API.
Author: JAN, BREConstructor 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
|
createPrintMap()
Creates the print image for the visible map area. |
IWBounds
|
getBounds()
Returns the coordinate bounds of the currently visible part of the map. |
int
|
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. |
|
getCurrentTileContainer()
undocumented |
|
getDivTileMapX()
undocumented |
|
getDivTileMapY()
undocumented |
HTMLDivElement
|
getDrawingContainer()
Returns the drawing container for SVG and VML. |
IWLayerInterface
|
getLayerByName(layerName)
Returns a layer by its name. |
IWLayerInfoManager
|
getLayerInfoManager()
Returns the layer info manager for the map. |
IWLayerInterface[]
|
getLayers()
Returns all layers. |
IWLayoutManager
|
getLayoutManager()
Returns the layout manager for the map. |
float
|
getMapHeightInMeter()
Returns the height of the visible map area in meter. |
float
|
getMapWidthInMeter()
Returns the width of the visible map area in meter. |
int
|
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. |
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. |
int
|
getZoom()
Returns the current zoom level. |
int
|
getZoomByMeter(meter)
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. |
void
|
openTooltip(coordinate, text)
Opens a new IWTooltip at the specified coordinate on the map.
|
void
|
opticalZoom(startZoom, targetZoom, zoomCenterPixelX, zoomCenterPixelY, moveOffset)
Provides an optical zoom effect for 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)
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. |
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. |
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. |
String
|
toString()
Returns a string prepresentation of this map. |
void
|
undo()
Reverts the effect of the last user action if there is one on the stack. |
boolean
|
zoom(startZoom, targetZoom, zoomCenterPixelX, zoomCenterPixelY, adjustToCenter)
Sets the new zoom level. |
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
|
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
|
void
|
triggerOnInitialize(event)
The onInitialize 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 IWMapInitializeEvent. |
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 IWMoveEvent. |
void
|
triggerOnProjectionInitialize()
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
|
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(event)
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(mapContainer)
HTMLDivElement mapContainer
- the div element to be used as parent for the map
Method Detail |
void addLayer(layer)
IWLayerInterface layer
- (e.g. IWLayer
or IWLayerGroup
)
void
void addWindowOverlay(windowOverlay)
IWWindowOverlay windowOverlay
- the window overlay
void
void createPrintMap()
void
IWBounds getBounds()
IWBounds
int getBoundsZoomlevel(bounds)
IWBounds bounds
- a section of the visible map area
int
IWCoordinate getCenter()
IWCoordinate
HTMLDivElement getClippingContainer()
HTMLDivElement
the clipping container.
HTMLDivElement getContainer()
HTMLDivElement
HTMLDivElement getControlContainer()
HTMLDivElement
the control container.
IWCopyrightControl getCopyrightControl()
IWCopyrightControl
IWMapType getCurrentMapType()
IWMapType
getCurrentTileContainer()
getDivTileMapX()
getDivTileMapY()
HTMLDivElement getDrawingContainer()
HTMLDivElement
IWLayerInterface getLayerByName(layerName)
layerName
IWLayerInterface
IWLayerInfoManager getLayerInfoManager()
IWLayerInfoManager
IWLayerInterface[] getLayers()
IWLayerInterface[]
IWLayoutManager getLayoutManager()
IWLayoutManager
float getMapHeightInMeter()
float
float getMapWidthInMeter()
float
int getMeterPerPixel()
int
IWMapOptions getOptions()
IWMapOptions
HTMLDivElement getOverlayContainer()
HTMLDivElement
the overlay container.
IWOverlayManager getOverlayManager()
IWOverlayManager
String getSessionId()
String
the session id
HTMLDivElement getTilesContainer()
HTMLDivElement
the tile container
HTMLDivElement getWindowOverlayContainer()
HTMLDivElement
the WindowOverlay container.
int getZoom()
int
int getZoomByMeter(meter)
int meter
int
the zoomlevel
HTMLDivElement getZoomingAndDraggingContainer()
HTMLDivElement
the ZoomingAndDragging container.
void openInfoBalloon(coordinate, content)
IWCoordinate coordinate
- the coordinate of the infoballoon
Object content
- the content of the infoballoon
void
void openTooltip(coordinate, text)
IWTooltip
at the specified coordinate on the map.
IWCoordinate coordinate
String text
void
void opticalZoom(startZoom, targetZoom, zoomCenterPixelX, zoomCenterPixelY, moveOffset)
zoom
to finish the zoom process.
int startZoom
int targetZoom
int zoomCenterPixelX
- the zoom center in pixel
int zoomCenterPixelY
- the zoom center in pixel
IWPoint moveOffset
- moves the zoom center by this offset
void
void panBy(offset, undoable)
IWPoint offset
- the offset in pixels
boolean undoable
- true, if this action should be undoable, otherwise false.
void
void panTo(coordinate)
IWCoordinate coordinate
- a coordinate
void
void redo()
void
void redraw()
void
void removeInfoBalloon()
void
void removeLayer(layer)
IWLayerInterface layer
- (e.g. IWLayer
or IWLayerGroup
)
void
IWLayerInterface removeLayerByName(layerName)
String layerName
IWLayerInterface
layer (e.g. IWLayer
or IWLayerGroup
)
void removeTooltip()
IWTooltip
from the map.
void
void removeWindowOverlay(windowOverlay)
IWWindowOverlay windowOverlay
- the window overlay
void
void returnToSavedPosition()
void
void savePosition()
void
void setCenter(coordinate, zoom, mapType)
IWCoordinate coordinate
- the new map center
int zoom
- the new zoom level
IWMapType mapType
- a map type
void
String toString()
String
void undo()
void
boolean zoom(startZoom, targetZoom, zoomCenterPixelX, zoomCenterPixelY, adjustToCenter)
int startZoom
- the start zoom level
int targetZoom
- the target zoom level
int zoomCenterPixelX
int zoomCenterPixelY
boolean adjustToCenter
boolean
boolean zoomIn(undoable)
boolean undoable
- true or empty, if this action should be undoable, otherwise false.
boolean
true
if zoom was successful, else false
.
boolean zoomOut(undoable)
boolean undoable
- true or empty, if this action should be undoable, otherwise false.
boolean
true
if zoom was successful, else false
.
Event Detail |
void triggerOnCenter(event)
Register an event listener with IWEventManager.addListener(yourMapObject, 'oncenter', yourHandlerMethod(event)); to receive the IWMapCenterEvent.
IWMapCenterEvent event
- the map centered event
void
void triggerOnClick(event)
Register an event listener with IWEventManager.addListener(yourMapObject, 'onclick', yourHandlerMethod(event)); to receive the IWMouseEvent.
IWMouseEvent event
- the mouse event
void
void triggerOnCopyrightChange(event)
Register an event listener with
IWEventManager.addListener(yourMapObject, 'oncopyrightchange', yourHandlerMethod(event));
to
receive the IWCoyprightChangedEvent
.
IWCopyrightChangeEvent event
- the event
void
void triggerOnInitialize(event)
Register an event listener with IWEventManager.addListener(yourMapObject, 'oninitialize', yourHandlerMethod(event)); to receive the IWMapInitializeEvent.
IWMapInitializeEvent event
- the map initialized event
void
void triggerOnLanguageChange(event)
Register an event listener with IWEventManager.addListener(yourMapObject, 'onlanguagechange', yourHandlerMethod(event)); to receive the IWLanguageChangeEvent.
IWLanguageChangeEvent event
- the event
void
void triggerOnMapControlChange(event)
Register an event listener with IWEventManager.addListener(yourMapObject, 'onmapcontrolchange', yourHandlerMethod(event)); to receive the IWMapControlChangeEvent.
IWMapControlChangeEvent event
- the event
void
void triggerOnMapTypeAvailabilityChange(event)
Register an event listener with IWEventManager.addListener(yourMapObject, 'onmaptypeavailabilitychange', yourHandlerMethod(event)); to receive the IWMapTypesChangeEvent.
IWMapTypeAvailabilityChangeEvent event
- the event
void
void triggerOnMapTypeChange(event)
Register an event listener with IWEventManager.addListener(yourMapObject, 'onmaptypechange', yourHandlerMethod(event)); to receive the IWMapTypeChangeEvent.
IWMapTypeChangeEvent event
- the event
void
void triggerOnMapTypeChangeStart(event)
Register an event listener with IWEventManager.addListener(yourMapObject, 'onmaptypechangestart', yourHandlerMethod(event)); to receive the IWMapTypeChangeEvent.
IWMapTypeChangeEvent event
- the event
void
void triggerOnMapTypesChange(event)
Register an event listener with IWEventManager.addListener(yourMapObject, 'onmaptypeschange', yourHandlerMethod(event)); to receive the IWMapTypesChangeEvent.
IWMapTypesChangeEvent event
- the event
void
void triggerOnMouseDown(event)
Register an event listener with IWEventManager.addListener(yourMapObject, 'onmousedown', yourHandlerMethod(event)); to receive the IWMouseEvent.
IWMouseEvent event
- the mouse event
void
void triggerOnMouseStop(event)
Register an event listener with IWEventManager.addListener(yourMapObject, 'onmousestop', yourHandlerMethod(event)); to receive the IWMouseEvent.
IWMouseEvent event
- the mouse event
void
void triggerOnMouseUp(event)
Register an event listener with IWEventManager.addListener(yourMapObject, 'onmouseup', yourHandlerMethod(event)); to receive the IWMouseEvent.
IWMouseEvent event
- the mouse event
void
void triggerOnMove(event)
Register an event listener with IWEventManager.addListener(yourMapObject, 'onmove', yourHandlerMethod(event)); to receive the IWMoveEvent.
IWMoveEvent event
- the move event
void
void triggerOnMoveEnd(event)
Register an event listener with IWEventManager.addListener(yourMapObject, 'onmoveend', yourHandlerMethod(event)); to receive the IWMoveEvent.
IWMoveEvent event
- the move event
void
void triggerOnMoveStart(event)
Register an event listener with IWEventManager.addListener(yourMapObject, 'onmovestart', yourHandlerMethod(event)); to receive the IWMoveEvent.
IWMoveEvent event
- the move event
void
void triggerOnProjectionInitialize()
Register an event listener with IWEventManager.addListener(yourMapObject, 'onprojectioninitialize', yourHandlerMethod(event)); to receive this event.
void
void triggerOnProjectionInvalid()
Register an event listener with IWEventManager.addListener(yourMapObject, 'onprojectioninvalid', yourHandlerMethod(event)); to receive this event.
void
void triggerOnResize(event)
Register an event listener with IWEventManager.addListener(yourMapObject, 'onresize', yourHandlerMethod(event)); to receive this event.
IWResizeEvent event
- the resize event
void
void triggerOnZoom(event)
Register an event listener with IWEventManager.addListener(yourMapObject, 'onzoom', yourHandlerMethod(event)); to receive the IWZoomEvent.
IWZoomEvent event
- the zoom event
void
void triggerOnZoomEnd(event)
Register an event listener with IWEventManager.addListener(yourMapObject, 'onzoomend', yourHandlerMethod(event)); to receive the IWZoomEvent.
IWZoomEvent event
- the zoom event
void
void triggerOnZoomStart(event)
Register an event listener with IWEventManager.addListener(yourMapObject, 'onzoomstart', yourHandlerMethod(event)); to receive the IWZoomEvent.
IWZoomEvent event
- the zoom event
void