Skip to main content
PREV CLASS NEXT CLASS FRAMES NO FRAMES

 

Class 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
Constructor Attributes Constructor Name and Description
 
IlvTiledView(left, top, width, height, tileSize, namespace)
Method Summary
Method Attributes Method Name and Description
 
Adds a listener to be called when the dynamic layer view has loaded a new image, but the image is not currently visible.
 
Adds a listener to be called when the capabilities have been loaded.
 
Adds a listener to be called when the dynamic layer view has loaded a new image.
 
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.
 
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.
 
Returns the current zoom level of the view.
 
Retrieve dynamic layers
 
Returns the dynamic visible layers
 
Returns the background color of the generated image or null if not specified.
 
Returns the format of the tile images generated from the server.
 
Returns an array of strings of available layers on the server.
 
Returns the bounding box of the manager on the server side.
 
Returns the maximum zoom level available on the server side.
 
Returns the message panel where the messages will be displayed.
 
Returns an array of string of all the layers that will be displayed on the overview window.
 
Returns the factor used to pan.
 
Returns the pop-up menu on set this view.
 
Returns the IlvRectangle object that can be used to draw a rectangle on the view.
 
Get request URL
 
Returns the IlvSelectionManager for this view.
 
Returns the static visible layers
 
Returns the automatic update interval of the dynamic layer.
 
Returns the current visible area of the manager.
 
Returns the visible dynamic and static visible layers
 
Returns the factor used when calling the zoomIn and zoomOut methods if and only if fixed zoom levels are not set.
 
Retrieves the zoom levels as an array of double.
 
Hides the image map layer.
 
init()
Initializes the view.
 
Indicates if the automatic update will also update the capabilities.
 
Indicates if the capabilities have been loaded from the server.
 
Returns whether the view is constrained to the manager content bounds or not.
 
Check if a layer is dynamic
 
Returns whether view bounding box equals the manager bounding box.
 
Indicates whether the component is generating an image map in addition to the image.
 
Indicates if a layer is currently visible.
 
moveTo(x, y, noUpdate, animation)
Queries new images with the specified value for the top-left corner.
 
Pans the image to the east.
 
Pans the image to the north.
 
Pans the image to the northeast.
 
Pans the image to the northwest.
 
Pans the image to the south.
 
Pans the image to the southeast.
 
Pans the image to the southwest.
 
Pans the image to the west.
 
performAction(actionName, params, capabilities, capabilitiesParams)
Performs an action on the server side.
 
Allows you to read additional information generated by the capabilities request.
 
Removes a listener installed with addBeforeImageLoadedListener.
 
Removes a listener installed with addCapabilitiesOnLoadListener.
 
Removes a listener installed with addImageOnLoadListener.
 
Removes a listener installed with addInteractorListener.
 
Resets the timer that will invoke the session expiration handler.
 
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.
 
Tells the component to generate an image map in addition to the image.
 
Sets the background color of the generated image.
 
setImageFormat(format)
Sets the format of the tile images generated from the server, the format can be the string JPEG or PNG.
 
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 pop-up menu on this view.
 
setRequestURL(requestURL)
Set request URL
 
Sets a listener that will be called when the HTTP session is about to be invalidated.
 
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.
 
Queries new images showing all the area available from the server.
 
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.
 
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.
 
Zooms the view out by querying a new image from the server.
 
zoomToIdentity(nearZoomLevelAllowed)
Sets the identity transformer on the view.
Methods inherited from class IlvAbstractView
childrenToHTML, getCursor, getGlassView, getHitInfos, getHitInfoTypes, getInteractor, keyPress, mouseDown, mouseDrag, mouseMove, mouseOut, mouseOver, mouseUp, putHitInfoType, setAccessible, setAdditionalParameters, setChildrenBounds, setCursor, setHitmapLayers, setInteractor, setScrollBarSize, setScrollBarState
Methods inherited from class IlvResizableView
getMaximumSize, getMinimumSize, isResizable, setHotkeys, setMaximumSize, setMinimumSize, setResizable, toHTML
Methods inherited from class IlvEmptyView
addSizeListener, getBounds, getHeight, getLeft, getLocation, getSize, getTop, getWidth, isStateInCookie, removeSizeListener, restoreState, saveState, setBounds, setLocation, setSize, setStateInCookie
Methods inherited from class IlvObject
dispose, getClassName, hashCode, instanceOf, invoke, registerDispose, registerDisposeByClientId, removeHTML, setClassName, superConstructor, superInvoke, toString, updateVisibility
Constructor Detail
IlvTiledView
IlvTiledView(left, top, width, height, tileSize, namespace)
Parameters:
left - X position
top - Y position
width - Width
height - Height
tileSize - The size of the tile.
namespace
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.
Parameters:
x
y

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.
Parameters:
qx
qy
qw
qh
width
height
layers

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.

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 pop-up menu on set this view.
Returns:
the pop-up 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

getSelectionManager
getSelectionManager()
Returns the IlvSelectionManager for this view.

This manager allows to prevent an image query on each selection. It queries the server for selection updates and displays rectangles to represent the selection.

The most common use of this method are:

The selection manager is lazilly created. As a consequence, the current server selection is not shown on the client before a first call to this method.


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.
Since:
JViews 8.0
Returns:
The array of zoom levels or null if none has been set by the capability request.

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.

Since:
JViews 8.1
Returns:
Returns whether the view is constrained or not.

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.

moveTo
moveTo(x, y, noUpdate, animation)
Queries new images with the specified value for the top-left corner.
Parameters:
x - New value for the left in the server coordinate system.
y - New value for the top in the server coordinate system.
noUpdate
animation

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.

performAction
performAction(actionName, params, capabilities, capabilitiesParams)
Performs an action on the server side. This method requests a new image from the client. Additional parameters are sent in the image request so that an action can be performed on the server side before the image is generated. This allows you to define a new type of interaction on the image. To implement the action on the server side, you must implement an action listener (ServerActionListener) on the server side. The action is defined by a name and a list of parameters. Note that only the dynamic layers are updated.
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, true] is used.

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.

resetSessionExpirationTimer
resetSessionExpirationTimer()
Resets the timer that will invoke the session expiration handler.
Since:
JViews 8.1
See also:
#setSessionExpirationHandler

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

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

setGenerateImageMap
setGenerateImageMap(set)
Tells the component to generate an image map in addition to the image.
Parameters:
set - true to generate an image map; false otherwise.

setImageBackgroundColor
setImageBackgroundColor(color)
Sets the background color of the generated image.
Parameters:
color - The background color expressed as a string, for example 'RRGGBB'.

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.
Parameters:
format

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.
Parameters:
factor

setPopupMenu
setPopupMenu(popupMenu)
Sets the pop-up menu on this view.
Parameters:
popupMenu - the pop-up 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 #resetSessionExpirationTimer 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.
Parameters:
x
y
w
h
scale
noUpdate

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.
Parameters:
factor

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.
delayedDynLayer

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.

©Copyright Rogue Wave Software Inc. 1997, 2018. All Rights Reserved.