| PREV CLASS Documentation homepage NEXT CLASS |
IlvObject
|
+--IlvEmptyView
|
+--IlvResizableView
|
+--IlvAbstractView
|
+--IlvView
IlvView is a component that displays an image obtained from a
server.
The server component must be an instance of IlvManagerServlet.
This component can be connected to several components that allow you to
manipulate it: A legend tool (IlvLegend), an overview
(IlvOverview), and tools to zoom (IlvZoomTool) and
pan (IlvPanTool).
The IlvInteractor class allows you to implement interaction
with the view.
| Constructor Summary | |
|---|---|
IlvView(left, top, width, height, namespace)
|
|
| Method Summary | |
|---|---|
addCapabilitiesOnLoadListener(listener)
Adds a listener to be called when the capabilities have been loaded. |
|
addErrorListener(listener)
Adds a listener to be called when an error occurs for the current request. |
|
addImageOnLoadListener(listener)
Adds a listener to be called when the view has loaded a new image. |
|
addInteractorListener(listener)
Adds a listener to be called when an interactor has changed on the view. |
|
addTimeoutErrorListener(listener)
Adds a listener to be called when a timeout has been reached for the current request. |
|
centerAt(x, y)
Queries a new image centered at the specified point. |
|
createCapabilitiesRequestURL()
Creates the HTTP request for capabilities. |
|
createImageMapRequestURL(qx, qy, qw, qh, width, height, layers)
Creates the URL for generating an image map. |
|
createRequestURL(qx, qy, qw, qh, width, height, layers)
Creates the URL for the image request. |
|
dispose()
Releases the cookie holding the current image request. |
|
getBlendTransform()
Indicates if the new images will be revealed by fading the previous image. |
|
getCurrentZoomLevel()
Returns the current zoom level of the view. |
|
getImageBackgroundColor()
Returns the background color of the generated image or null if
not specified. |
|
getImageFormat()
Returns the format of the images generated from the server. |
|
getInteractor()
Returns the interactor of the view. |
|
getLayers()
Returns an array of strings of available layers on the server. |
|
getManagerBBox()
Returns the bounding box of the manager on the server side. |
|
getMaxZoomLevel()
Returns the maximum zoom level available on the server side. |
|
getMessagePanel()
Returns the message panel where the messages will be displayed. |
|
getMinZoomLevel()
Returns the maximum zoom level available on the server side. |
|
getOverviewLayers()
Returns an array of string of all the layers that will be displayed on the overview window. |
|
getPanFactor()
Returns the factor used to pan. |
|
getPopupMenu()
Returns the popup menu on set this view. |
|
getRectangle()
Returns the IlvRectangle object that can be used to draw a
rectangle on the view. |
|
getRequestURL()
Returns the URL to be used to create the request as set using setRequestURL. |
|
getTimeoutErrorInterval()
Returns the timeout interval for requests to the server, in seconds. |
|
getUpdateInterval()
Returns the automatic update interval of the view. |
|
getViewBBox()
Returns the current visible area of the manager. |
|
getVisibleLayers()
Returns an array of strings of available layers on the server. |
|
getWaitingImage()
Returns the URL of the image used to show that the component is waiting for a server response. |
|
getZoomFactor()
Returns the factor used when calling the zoomIn and
zoomOut methods if the zoom is free. |
|
getZoomLevels()
Retrieves the zoom levels as an array of double. |
|
hideImageMap()
Hides the image map layer. |
|
init()
Initializes the view. |
|
isAutoUpdateCapabilities()
Indicates if the automatic update will also update the capabilities. |
|
isCapabilitiesLoaded()
Indicates if the capabilities have been loaded from the server. |
|
isConstrainedOnContents()
Returns whether the view is constrained to the manager content bounds or not. |
|
isDeletingCookieOnDispose()
Tells if the view is deleting its cookies on dispose. |
|
isFitToContent()
Returns whether view bounding box equals the manager bounding box. |
|
isGenerateImageMap()
Indicates whether the component is generating an image map in addition to the image. |
|
isLayerVisible(layer)
Indicates if a layer is currently visible. |
|
moveTo(x, y)
Queries a new image with the specified value for the top-left corner. |
|
panEast()
Pans the image to the east. |
|
panNorth()
Pans the image to the north. |
|
panNorthEast()
Pans the image to the northeast. |
|
panNorthWest()
Pans the image to the northwest. |
|
panSouth()
Pans the image to the south. |
|
panSouthEast()
Pans the image to the southeast. |
|
panSouthWest()
Pans the image to the southwest. |
|
panWest()
Pans the image to the west. |
|
performAction(actionName, params, capabilities, capabilitiesParams)
Performs an action on the server side. |
|
readAdditionalCapabilities(context)
Allows you to read additional information generated by the capabilities request. |
|
removeCapabilitiesOnLoadListener(listener)
Removes a listener installed with addCapabilitiesOnLoadListener. |
|
removeErrorListener(listener)
Removes a listener installed with addErrorListener. |
|
removeImageOnLoadListener(listener)
Removes a listener installed with addImageOnLoadListener. |
|
removeInteractorListener(listener)
Removes a listener installed with addInteractorListener. |
|
removeTimeoutErrorListener(listener)
Removes a listener installed with addTimeoutErrorListener. |
|
resetSessionExpirationTimer()
Resets the timer that will invoke the session expiration handler. |
|
setAdditionalParameters(key, value)
Installs an additional request parameter that will be added to all requests. |
|
setAutoUpdateCapabilities(set)
When set to true the automatic update will also update the
capabilities. |
|
setBlendTransform(set)
Indicates if the new images will be revealed by fading the previous image. |
|
setConstrainedOnContents(constrainedOnContents)
Defines whether the view is constrained to the manager content bounds or not. |
|
setDeletingCookieOnDispose(del)
Tells the view it should delete its cookie when the dispose function is called. |
|
setImageFormat(format)
Sets the format of the images generated by the server. |
|
setInteractor(inter)
Changes the interactor of the view. |
|
setLayerVisible(layer, visible, update)
Hides or shows a layer by querying a new image from the server. |
|
setMessagePanel(ilvHTMLPanel)
Sets the message panel where the message will be displayed. |
|
setPanFactor(factor)
Sets the factor used to pan. |
|
setPopupMenu(popupMenu)
Sets the popup menu on this view. |
|
setRequestURL(requestURL)
Sets the URL to be used to create the request. |
|
setSessionExpirationHandler(handler)
Sets a listener that will be called when the HTTP session is about to be invalidated. |
|
setTimeoutErrorInterval(interval)
Sets the timeout interval for requests to the server. |
|
setUpdateInterval(rate)
Changes the automatic update interval of the view. |
|
setViewBBox(x, y, w, h)
Queries a new image showing the specified rectangle. |
|
setWaitingImage(image)
Sets the image to display when the component is waiting for a server response. |
|
setZoomFactor(factor)
Changes the factor used when zooming. |
|
showAll()
Queries a new image showing all the area available from the server. |
|
showImageMap()
Shows the image map layer. |
|
updateAll(showAll, keepLayerVisibility)
Queries new capabilities and a new image from the server. |
|
updateImage()
Queries a new image from the server. |
|
zoomBy(z)
Zooms the view to a specified factor by querying a new image from the server. |
|
zoomIn()
Zooms the view in by querying a new image from the server. |
|
zoomOut()
Zooms the view out by querying a new image from the server. |
|
zoomToIdentity(nearZoomLevelAllowed)
Sets the identity transformer on the view. . |
|
| Constructor Detail |
IlvView(left, top, width, height, namespace)
| Method Detail |
addCapabilitiesOnLoadListener(listener)
listener - The listener function, which must have the following
parameter:
IlvView.addErrorListener(listener)
listener - The listener function, which must have the following
parameter:
IlvView.addImageOnLoadListener(listener)
listener - The listener function, which must have the following
parameter:
IlvView.addInteractorListener(listener)
listener - The listener function, which must have the following
parameters:
IlvView.IlvInteractor).IlvInteractor).addTimeoutErrorListener(listener)
listener - The listener function, which must have the following
parameter:
IlvView.centerAt(x, y)
createCapabilitiesRequestURL()
createImageMapRequestURL(qx, qy, qw, qh, width, height, layers)
createRequestURL(qx, qy, qw, qh, width, height, layers)
qx - The abscissa of the top-left corner requested in the manager's
coordinate system.qy - The ordinate of the top-left corner requested in the manager's
coordinate system.qw - The width requested in the manager's coordinate system.qh - The height requested in the manager's coordinate system.width - The width of the requested image.height - The height of the requested image.layers - Array of the layer names requested.dispose()
getBlendTransform()
getCurrentZoomLevel()
getImageBackgroundColor()
null if
not specified. getImageFormat()
getInteractor()
getLayers()
getManagerBBox()
left,
top, width, and height.
These properties define the manager's bounding box as floating point values.
This value is valid only when the capabilities have been loaded. getMaxZoomLevel()
The -1 value means no limit.
getMessagePanel()
getMinZoomLevel()
The -1 value means no limit.
getOverviewLayers()
getPanFactor()
panEast,
panWest, panNorth, panNorthEast,
panNorthWest,
panSouth, panSouthEast, and
panSouthWest. getPopupMenu()
getRectangle()
IlvRectangle object that can be used to draw a
rectangle on the view. This method is especially useful for interactors that
can display the interaction using this rectangle. getRequestURL()
setRequestURL. getTimeoutErrorInterval()
getUpdateInterval()
getViewBBox()
left,
top, width, and height. These
properties define the visible area as floating point values. getVisibleLayers()
getWaitingImage()
getZoomFactor()
zoomIn and
zoomOut methods if the zoom is free. getZoomLevels()
hideImageMap()
init()
onLoad event of the page
containing the view. isAutoUpdateCapabilities()
isCapabilitiesLoaded()
isConstrainedOnContents()
true.
Note that zoom levels (set by minZoomLevel or zoomLevels) lower than 1 will not be allowed if this property is set to true.
isDeletingCookieOnDispose()
isFitToContent()
isGenerateImageMap()
isLayerVisible(layer)
layer - The name of the layer.moveTo(x, y)
x - New value for the left in the server coordinate system.y - New value for the top in the server coordinate system.panEast()
panNorth()
panNorthEast()
panNorthWest()
panSouth()
panSouthEast()
panSouthWest()
panWest()
performAction(actionName, params, capabilities, capabilitiesParams)
ServerActionListener) on the server side.
The action is defined by a name and a list of parameters. actionName - The name of the action.params - The parameters of the action as an array of strings.capabilities - Indicates whether the action is affecting the capabilities
(like the manager bounds or the layer list, for example) or not.capabilitiesParams - The array that contains the parameter to pass to the getCapabilities method
(if the capabilities parameter is set to true).
If this parameter is omitted, the array [false, false, true] is used.readAdditionalCapabilities(context)
context - The object that contains the JavaScript variable generated
by the server.removeCapabilitiesOnLoadListener(listener)
addCapabilitiesOnLoadListener. listener - The listener to remove.removeErrorListener(listener)
addErrorListener. listener - The listener to remove.removeImageOnLoadListener(listener)
addImageOnLoadListener. listener - The listener to remove.removeInteractorListener(listener)
addInteractorListener. listener - The listener to remove.removeTimeoutErrorListener(listener)
addTimeoutErrorListener. listener - The listener to remove.resetSessionExpirationTimer()
#setSessionExpirationHandlersetAdditionalParameters(key, value)
null
value.
Adding additional parameters might be useful when defining a new interactor
that requires additional parameters. In this case you may set additional
parameters before calling updateImage, and then remove the
additional parameters. The parameter added will be &key=value. setAutoUpdateCapabilities(set)
true the automatic update will also update the
capabilities. setBlendTransform(set)
setConstrainedOnContents(constrainedOnContents)
true.
Note that zoom levels (set by minZoomLevel or zoomLevels) lower than 1 will not be allowed if this property is set to true.
constrainedOnContents - Defines whether the view is constrained or not.
setDeletingCookieOnDispose(del)
del - true to delete the cookie; false
otherwise.
setImageFormat(format)
format - the format to be set: "JPEG" or "PNG".setInteractor(inter)
inter - An instance of IlvInteractor.setLayerVisible(layer, visible, update)
layer - The name of the layer.visible - A Boolean value to turn the layer visibility on or off.update - Whether to update the image or not.setMessagePanel(ilvHTMLPanel)
ilvHTMLPanel - An instance of IlvHTMLPanel.setPanFactor(factor)
panEast, panWest, panNorth,
panNorthEast, panNorthWest, panSouth,
panSouthEast, and panSouthWest.
The default value is 0.5.
setPopupMenu(popupMenu)
popupMenu - the popup menu to set.
setRequestURL(requestURL)
requestURL - the request URL to be set.setSessionExpirationHandler(handler)
This method works if and only if the session inactivity is reset by a JViews request.
If the session inactivity is reset by an external request, the #resetSessionTimeoutTimer method must be called.
This method must be called before the capabilities request is made.
handler - The session expiration handler. This must be a function with one parameter: the view.
setTimeoutErrorInterval(interval)
interval - The timeout, specified in seconds. The default value is 600
or 10 minutes.setUpdateInterval(rate)
rate - The new interval in seconds. An interval of zero stops
the automatic update.setViewBBox(x, y, w, h)
x - New value for the left in the server coordinate system.y - New value for the top in the server coordinate system.w - New value for the width in the server coordinate system.h - New value for the height in the server coordinate system.setWaitingImage(image)
image - URL of the image to display when waiting for a server response.setZoomFactor(factor)
zoomIn and
zoomOut if the zoom is free.
The default value is 1.5.
showAll()
showImageMap()
updateAll(showAll, keepLayerVisibility)
showAll - When true the new image will show
all of the area available on the server.keepLayerVisibility - When true the current layer's
visibility state is kept.updateImage()
zoomBy(z)
z - The zoom factor.zoomIn()
#setZoomFactor .zoomOut()
#setZoomFactor .zoomToIdentity(nearZoomLevelAllowed)
nearZoomLevelAllowed - Whether snap to the nearest zoom level in fixed zoom
levels mode or fail if the exact zoom level is not in the list (default value is false).true if the transformation succeeded, false otherwise.| Inherited Methods from IlvAbstractView |
| Inherited Methods from IlvResizableView |
| Inherited Methods from IlvEmptyView |
| Inherited Methods from IlvObject |
| PREV CLASS Documentation homepage NEXT CLASS |