IlvTiledView

IlvObject
  |
  +--IlvEmptyView
       |
       +--IlvResizableView
            |
            +--IlvAbstractView
                 |
                 +--IlvTiledView
Category:
Graphics Framework component
JavaScript File:
IlvTiledView.js
Description:
IlvTiledView is a component that displays maps. Whereas IlvView uses one single image, this one uses a grid of tiles IlvTiledView to profit from browser's cache.

Since:
JViews 8.0


Constructor Summary
IlvTiledView(left, top, width, height, tileSize, namespace)

Method Summary
addBeforeImageOnLoadListener(listener)
Adds a listener to be called when the dynamic layer view has loaded a new image, but the image is not currently visible.
addCapabilitiesOnLoadListener(listener)
Adds a listener to be called when the capabilities have been loaded.
addImageOnLoadListener(listener)
Adds a listener to be called when the dynamic layer view has loaded a new image.
addInteractorListener(listener)
Adds a listener to be called when an interactor has changed on the view
centerAt(x, y)
Queries new images 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, format)
Creates the URL for the image request.
getCapabilities(reload, showAll, keepLayerVisibility, dynamicLayerRefresh)
Queries capabilities.
getCurrentZoomLevel()
Returns the current zoom level of the view.
getDynamicLayers()
Retrieve dynamic layers
getDynamicVisibleLayers()
Returns the dynamic visible layers
getImageBackgroundColor()
Returns the background color of the generated image or null if not specified.
getImageFormat()
Returns the format of the tile 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.
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()
Get request URL
getStaticVisibleLayers()
Returns the static visible layers
getUpdateInterval()
Returns the automatic update interval of the dynamic layer.
getViewBBox()
Returns the current visible area of the manager.
getVisibleLayers()
Returns the visible dynamic and static visible layers
getZoomFactor()
Returns the factor used when calling the zoomIn and zoomOut methods if and only if fixed zoom levels are not set.
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.
isDynamicLayer(layer)
Check if a layer is dynamic
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.
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.
readAdditionalCapabilities(context)
Allows you to read additional information generated by the capabilities request.
removeBeforeImageOnLoadListener(listener)
Removes a listener installed with addBeforeImageLoadedListener.
removeCapabilitiesOnLoadListener(listener)
Removes a listener installed with addCapabilitiesOnLoadListener.
removeImageOnLoadListener(listener)
Removes a listener installed with addImageOnLoadListener.
removeInteractorListener(listener)
Removes a listener installed with addInteractorListener.
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.
setConstrainedOnContents(constrainedOnContents)
Defines whether the view is constrained to the manager content bounds or not.
setImageFormat(format)
Sets the format of the tile images generated from the server, the format can be the string JPEG or PNG.
setInteractor(inter)
Changes the interactor of the view.
setLayerVisible(layer, visible)
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)
Changes the factor used to pan.
setPopupMenu(popupMenu)
Sets the popup menu on this view.
setRequestURL(requestURL)
Set request URL
setSessionExpirationHandler(handler)
Sets a listener that will be called when the HTTP session is about to be invalidated.
setUpdateInterval(rate)
Changes the automatic update interval of the dynamic layer.
setViewBBox(x, y, w, h, scale, noUpdate)
Queries a new image showing the specified rectangle.
setZoomFactor(factor)
Changes the factor used when calling the zoomIn and zoomOut methods if and only if fixed zoom levels are not set.
showAll()
Queries new images showing all the area available from the server.
showImageMap()
Shows the image map layer.
update(noFullUpdate, delayedDynLayer)
Updates the view.
updateAll(showAll, keepLayerVisibility, dynamicLayerRefresh)
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

IlvTiledView

IlvTiledView(left, top, width, height, tileSize, namespace)
Creates an instance of IlvTiledView.

Method Detail

addBeforeImageOnLoadListener

addBeforeImageOnLoadListener(listener)
Adds a listener to be called when the dynamic layer view has loaded a new image, but the image is not currently visible.
Parameters:
listener - The listener function that must have the following parameters :
 
   view  : The IlvTiledView instance.
 

addCapabilitiesOnLoadListener

addCapabilitiesOnLoadListener(listener)
Adds a listener to be called when the capabilities have been loaded.
Parameters:
listener - The listener function, which must have the following parameters:
   view: The IlvTiledView.
 

addImageOnLoadListener

addImageOnLoadListener(listener)
Adds a listener to be called when the dynamic layer view has loaded a new image.
Parameters:
listener - The listener function, which must have the following parameters:
   view: The IlvTiledView.
 

addInteractorListener

addInteractorListener(listener)
Adds a listener to be called when an interactor has changed on the view
Parameters:
listener - The listener function, which must have the following parameters:
   view: The IlvTiledView.
   oldInteractor: The old interactor (IlvInteractor).
   newInteractor: The new interactor (IlvInteractor).
 

centerAt

centerAt(x, y)
Queries new images centered at the specified point. The coordinates are expressed in the server coordinate system.

createCapabilitiesRequestURL

createCapabilitiesRequestURL()
Creates the HTTP request for capabilities.

createImageMapRequestURL

createImageMapRequestURL(qx, qy, qw, qh, width, height, layers)
Creates the URL for generating an image map.

createRequestURL

createRequestURL(qx, qy, qw, qh, width, height, layers, format)
Creates the URL for the image request.
Parameters:
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.
format - image format

getCapabilities

getCapabilities(reload, showAll, keepLayerVisibility, dynamicLayerRefresh)
Queries capabilities.
Parameters:
reload - Is this a reloading of the page.
showAll - If true the new image will show the entire area available on the server.
keepLayerVisibility - If true the current state of layer visibility is kept.
dynamicLayerRefresh - If true only the dynamic layer is refreshed.

getCurrentZoomLevel

getCurrentZoomLevel()
Returns the current zoom level of the view.

Since:
JViews 8.0


getDynamicLayers

getDynamicLayers()
Retrieve dynamic layers

getDynamicVisibleLayers

getDynamicVisibleLayers()
Returns the dynamic visible layers

getImageBackgroundColor

getImageBackgroundColor()
Returns the background color of the generated image or null if not specified.

getImageFormat

getImageFormat()
Returns the format of the tile images generated from the server. The dynamic layer is using the PNG format mandatorily. The default value is JPEG.

getInteractor

getInteractor()
Returns the interactor of the view.

getLayers

getLayers()
Returns an array of strings of available layers on the server. The value is valid only when the capabilities have been loaded from the server.

getManagerBBox

getManagerBBox()
Returns the bounding box of the manager on the server side. This method returns an object with four properties: left, top, width, and height. These properties define the manager bounding box as floating point values. This value is valid only when the capabilities have been loaded.

getMaxZoomLevel

getMaxZoomLevel()
Returns the maximum zoom level available on the server side. The value is valid only when the capabilities of the server have been loaded.

getMessagePanel

getMessagePanel()
Returns the message panel where the messages will be displayed.

getOverviewLayers

getOverviewLayers()
Returns an array of string of all the layers that will be displayed on the overview window. The value is valid only when the capabilities have been loaded from the server.

getPanFactor

getPanFactor()
Returns the factor used to pan. This factor is used in the methods panEast, panWest, panNorth, panNorthEast, panNorthWest, panSouth, panSouthEast, and panSouthWest.

getPopupMenu

getPopupMenu()
Returns the popup menu on set this view.
Returns:
the popup menu.

getRectangle

getRectangle()
Returns the 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

getRequestURL()
Get request URL

getStaticVisibleLayers

getStaticVisibleLayers()
Returns the static visible layers

getUpdateInterval

getUpdateInterval()
Returns the automatic update interval of the dynamic layer.

getViewBBox

getViewBBox()
Returns the current visible area of the manager. This method returns an object with four properties: left, top, width, and height. These properties define the visible area as floating point values.

getVisibleLayers

getVisibleLayers()
Returns the visible dynamic and static visible layers

getZoomFactor

getZoomFactor()
Returns the factor used when calling the zoomIn and zoomOut methods if and only if fixed zoom levels are not set. Otherwise this factor is unused.

getZoomLevels

getZoomLevels()
Retrieves the zoom levels as an array of double. This array is set by the capability request.
Returns:
The array of zoom levels or null if none has been set by the capability request.

Since:
JViews 8.0


hideImageMap

hideImageMap()
Hides the image map layer.

init

init()
Initializes the view. This method must be called on the onLoad event of the page containing the view.

isAutoUpdateCapabilities

isAutoUpdateCapabilities()
Indicates if the automatic update will also update the capabilities.

isCapabilitiesLoaded

isCapabilitiesLoaded()
Indicates if the capabilities have been loaded from the server.

isConstrainedOnContents

isConstrainedOnContents()
Returns whether the view is constrained to the manager content bounds or not. The default value is true.

Note that zoom levels (set by minZoomLevel or zoomLevels) lower than 1 will not be allowed if this property is set to true.

Returns:
Returns whether the view is constrained or not.

Since:
JViews 8.1


isDynamicLayer

isDynamicLayer(layer)
Check if a layer is dynamic
Parameters:
layer -

isFitToContent

isFitToContent()
Returns whether view bounding box equals the manager bounding box. If this is the case all the objects of manager are displayed by the view.

Since:
JViews 8.1


isGenerateImageMap

isGenerateImageMap()
Indicates whether the component is generating an image map in addition to the image.

isLayerVisible

isLayerVisible(layer)
Indicates if a layer is currently visible.
Parameters:
layer - The name of the layer.

panEast

panEast()
Pans the image to the east.

panNorth

panNorth()
Pans the image to the north.

panNorthEast

panNorthEast()
Pans the image to the northeast.

panNorthWest

panNorthWest()
Pans the image to the northwest.

panSouth

panSouth()
Pans the image to the south.

panSouthEast

panSouthEast()
Pans the image to the southeast.

panSouthWest

panSouthWest()
Pans the image to the southwest.

panWest

panWest()
Pans the image to the west.

readAdditionalCapabilities

readAdditionalCapabilities(context)
Allows you to read additional information generated by the capabilities request.
Parameters:
context - The object that contains the JavaScript variable generated by the server.

removeBeforeImageOnLoadListener

removeBeforeImageOnLoadListener(listener)
Removes a listener installed with addBeforeImageLoadedListener.
Parameters:
listener - The listener to remove.

removeCapabilitiesOnLoadListener

removeCapabilitiesOnLoadListener(listener)
Removes a listener installed with addCapabilitiesOnLoadListener.
Parameters:
listener - The listener to remove.

removeImageOnLoadListener

removeImageOnLoadListener(listener)
Removes a listener installed with addImageOnLoadListener.
Parameters:
listener - The listener to remove.

removeInteractorListener

removeInteractorListener(listener)
Removes a listener installed with addInteractorListener.
Parameters:
listener - The listener to remove.

setAdditionalParameters

setAdditionalParameters(key, value)
Installs an additional request parameter that will be added to all requests. You can remove the parameters by passing the 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

setAutoUpdateCapabilities(set)
When set to true the automatic update will also update the capabilities.

setConstrainedOnContents

setConstrainedOnContents(constrainedOnContents)
Defines whether the view is constrained to the manager content bounds or not. The default value is true.

Note that zoom levels (set by minZoomLevel or zoomLevels) lower than 1 will not be allowed if this property is set to true.

Parameters:
constrainedOnContents - Defines whether the view is constrained or not.

Since:
JViews 8.1


setImageFormat

setImageFormat(format)
Sets the format of the tile images generated from the server, the format can be the string JPEG or PNG. The dynamic layer is using the PNG format mandatorily.

setInteractor

setInteractor(inter)
Changes the interactor of the view.
Parameters:
inter - An instance of IlvInteractor.

setLayerVisible

setLayerVisible(layer, visible)
Hides or shows a layer by querying a new image from the server.
Parameters:
layer - The name of the layer.
visible - A Boolean value to turn the layer visibility on or off.

setMessagePanel

setMessagePanel(ilvHTMLPanel)
Sets the message panel where the message will be displayed
Parameters:
ilvHTMLPanel - An instance of IlvHTMLPanel.

setPanFactor

setPanFactor(factor)
Changes the factor used to pan. The default value is 0.5. This factor is used in the methods panEast, panWest, panNorth, panNorthEast, panNorthWest, panSouth, panSouthEast, and panSouthWest.

setPopupMenu

setPopupMenu(popupMenu)
Sets the popup menu on this view.
Parameters:
popupMenu - the popup menu to set.

setRequestURL

setRequestURL(requestURL)
Set request URL
Parameters:
requestURL -

setSessionExpirationHandler

setSessionExpirationHandler(handler)
Sets a listener that will be called when the HTTP session is about to be invalidated.

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.

Parameters:
handler - The session expiration handler. This must be a function with one parameter: the view.

Since:
JViews 8.1


setUpdateInterval

setUpdateInterval(rate)
Changes the automatic update interval of the dynamic layer.
Parameters:
rate - The new interval in seconds. An interval of zero stops the automatic update.

setViewBBox

setViewBBox(x, y, w, h, scale, noUpdate)
Queries a new image showing the specified rectangle. The rectangle is expressed in the server coordinate system (manager). If the zoom level is not free, the rectangle bounds can be modified.

setZoomFactor

setZoomFactor(factor)
Changes the factor used when calling the zoomIn and zoomOut methods if and only if fixed zoom levels are not set. Otherwise this factor is unused. The default value is 1.5.

showAll

showAll()
Queries new images showing all the area available from the server.

showImageMap

showImageMap()
Shows the image map layer.

update

update(noFullUpdate, delayedDynLayer)
Updates the view.
Parameters:
noFullUpdate - Whether partially update the component.

updateAll

updateAll(showAll, keepLayerVisibility, dynamicLayerRefresh)
Queries new capabilities and a new image from the server.
Parameters:
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.
dynamicLayerRefresh - If true only the dynamic layer is refreshed after the capabilities are loaded.

updateImage

updateImage()
Queries a new image from the server.

zoomBy

zoomBy(z)
Zooms the view to a specified factor by querying a new image from the server. If the zoom is not free, the zoom level will the replaced by the nearest one.
Parameters:
z - The zoom factor.

zoomIn

zoomIn()
Zooms the view in by querying a new image from the server. If the zoom is free, the view is zoomed in by the zoom factor specified by #setZoomFactor .
If the zoom levels are fixed the view is zoomed to the next zoom level, if any.

zoomOut

zoomOut()
Zooms the view out by querying a new image from the server. If the zoom is free, the view is zoomed out by the zoom factor specified by #setZoomFactor .
If the zoom levels are fixed the view is zoomed to the next zoom level, if any.

zoomToIdentity

zoomToIdentity(nearZoomLevelAllowed)
Sets the identity transformer on the view.
. This method will not succeed if the identity zoom level is not in the fixed zoom level list or if the minimum or maximum zoom level is reached, in that case the view is left unchanged.
Parameters:
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).
Returns:
true if the transformation succeeded, false otherwise.

Inherited Methods from IlvAbstractView
childrenToHTML, getCursor, getGlassView, keyPress, mouseDown, mouseDrag, mouseMove, mouseOut, mouseOver, mouseUp, setChildrenBounds, setCursor
Inherited Methods from IlvResizableView
getMaximumSize, getMinimumSize, isResizable, setChildrenBounds, setMaximumSize, setMinimumSize, setResizable, toHTML
Inherited Methods from IlvEmptyView
addSizeListener, childrenToHTML, getBounds, getHeight, getLeft, getLocation, getSize, getTop, getWidth, isStateInCookie, removeSizeListener, restoreState, saveState, setBounds, setChildrenBounds, setLocation, setSize, setStateInCookie, toHTML
Inherited Methods from IlvObject
callDispose, dispose, getClassName, hashCode, inherits, instanceOf, invoke, registerDispose, removeHTML, setClassName, superConstructor, superInvoke, toString, updateVisibility