Skip to main content
PREV CLASS NEXT CLASS FRAMES NO FRAMES

 

Class IlvGoogleMapView

IlvObject
   |
   +--IlvGoogleMapView

Category:
Maps JSF component
JavaScript File:
IlvGoogleMapView.js
Description:
Creates the JavaScript object that manages a Google Map view.

Constructor Summary
Constructor Attributes Constructor Name and Description
 
IlvGoogleMapView(clientId, parentId)
Method Summary
Method Attributes Method Name and Description
 
Adds a listener for capabilities
 
Adds a listener invoked when the google map overlays are updated.
 
Adds a listener for selection change
 
Capabilities loaded
 
commitSelectionProperties(sel, callback)
Validates changes done on the selection through a server request
 
Creates the capabilities request to send the servler
 
createImageRequestURL(qx, qy, qw, qh, tw, th, layerArray, format)
Creates an image request.
 
createListRequestURL(qx, qy, qw, qh, tw, th, layerArray)
Creates a request to get the list of symbols and their properties on layers/bounding boxes
 
Create a Google map marker for the JSON object.
 
Creates an image request for a symbol icon
 
createSelectRequestURL(objId, selectionType)
Creates a symbol selection request
 
Creates a single symbol property request
 
endCapabilitiesLoaded(capabilities)
(AJAX) Called when servlet returns capabilities.
 
Returns the absolute identifier of the server side JavaServer Faces component.
 
Sends an AJAX request to get capabilities
 
Returns all layers declared through capability requests
 
Utility method to retrieve the additional parameters that will be sent on all server requests
 
Constructs a selection object
 
Retrieves the object in charge of managing selection
 
(AJAX) Called when we receive information on a yet unknown symbol that has just been selected.
 
getTileUrl(p0, zl)
(AJAX) called through Google map.
 
Get the list of visible layers
 
Indicates if capabilities (i.e.
 
Dynamic layers, as per capabilities
 
Indicates whether a layer is visible
 
Returns true when the elements in the view can be moved.
 
isReuseIcon(layer)
Indicates whether the reuse icon flag is set for the layer
 
We don't want tiled view behaviour
 
moveID(id, lat, lon)
Moves a marker.
 
IlvGoogleMapView. onload(client)
Initializes the view.
 
performJSFAction(mb, params)
Performs an predefined action that will invoke the specified method binding.
 
Removes a listener installed with addCapabilitiesOnLoadListener.
 
Removes a listener installed with addImageOnLoadListener.
 
Removes a listener installed with addCapabilitiesOnLoadListener.
 
selectID(id)
Selects a marker.
 
setAbsoluteId(absId)
Sets the absolute identifier of the server side JavaServer Faces component.
 
setCenter(lat, lon, level)
Sets the map initial center and zoom level.
 
setControls(list)
Sets the list of control classes.
 
setLayerVisible(layer, visible, update)
Changes the visibility state of a layer
 
setNodeMovable(nodeMovable)
Allows or forbids to move elements in the view.
 
setRequestParameters(key, value)
Utility method to register an additional parameter that will be sent on all server requests.
 
setReuseIcon(layer, reuse)
Indicates to reuse the marker icons for a specific layer.
 
setServletClass(servletClass)
Sets the class of the servlet that generates the image that will be instantiated, if needed, by the controller servlet.
 
setServletURL(servletURL)
Sets the URL of the image generating servlet.
 
update(layerUpdated)
Refresh overlays
 
updateMarkers(layers, x, y, w, h)
Send an AJAX request to retrieve the list of symbols in the layer and bounding box passed
 
Create or replace a google map marker
 
updateSymbols(symbolList)
(AJAX) Called when the server returns the list of symbols.
Methods inherited from class IlvObject
dispose, getClassName, hashCode, instanceOf, invoke, registerDispose, registerDisposeByClientId, removeHTML, setClassName, superConstructor, superInvoke, toString, updateVisibility
Constructor Detail
IlvGoogleMapView
IlvGoogleMapView(clientId, parentId)
Parameters:
clientId - name of this component for the outside world
parentId - the DIV where the map should be inserted
Method Detail
addCapabilitiesOnLoadListener
addCapabilitiesOnLoadListener(listener)
Adds a listener for capabilities
Parameters:
listener

addImageOnLoadListener
addImageOnLoadListener(listener)
Adds a listener invoked when the google map overlays are updated.
Parameters:
listener - The listener to add.

addSelectionChangedListener
addSelectionChangedListener(listener)
Adds a listener for selection change
Parameters:
listener

capabilitiesOnLoadListener
capabilitiesOnLoadListener()
Capabilities loaded

commitSelectionProperties
commitSelectionProperties(sel, callback)
Validates changes done on the selection through a server request
Parameters:
sel - selection
callback - function called after server changed the property

createCapabilitiesRequestURL
createCapabilitiesRequestURL()
Creates the capabilities request to send the servler

createImageRequestURL
createImageRequestURL(qx, qy, qw, qh, tw, th, layerArray, format)
Creates an image request.
Parameters:
qx - The x of the requested image.
qy - The y of the requested image.
qw - The width of the requested image.
qh - The height of the requested image.
tw - ignored.
th - ignored.
layerArray - the array of layer names.
format - image format.

createListRequestURL
createListRequestURL(qx, qy, qw, qh, tw, th, layerArray)
Creates a request to get the list of symbols and their properties on layers/bounding boxes
Parameters:
qx - The x of the requested zone.
qy - The y of the requested zone.
qw - The width of the requested zone.
qh - The height of the requested zone.
tw - ignored.
th - ignored.
layerArray - the array of layer names.

createMarker
createMarker(obj)
Create a Google map marker for the JSON object.
Parameters:
obj - the JSON object.

createMarkerIconRequestURL
createMarkerIconRequestURL(objid)
Creates an image request for a symbol icon
Parameters:
objid - the symbol id.

createSelectRequestURL
createSelectRequestURL(objId, selectionType)
Creates a symbol selection request
Parameters:
objId
selectionType

createSymbolPropertiesRequestURL
createSymbolPropertiesRequestURL(objid)
Creates a single symbol property request
Parameters:
objid - the symbol id.

endCapabilitiesLoaded
endCapabilitiesLoaded(capabilities)
(AJAX) Called when servlet returns capabilities.
Parameters:
capabilities - the JSON object containing capabilities information.

getAbsoluteId
getAbsoluteId()
Returns the absolute identifier of the server side JavaServer Faces component. This identifier must be returned to update component properties that reference other components.
Returns:
The absolute identifier of the component.

getCapabilities
getCapabilities()
Sends an AJAX request to get capabilities

getLayers
getLayers()
Returns all layers declared through capability requests

getRequestParameters
getRequestParameters()
Utility method to retrieve the additional parameters that will be sent on all server requests

getSelection
getSelection()
Constructs a selection object

getSelectionManager
getSelectionManager()
Retrieves the object in charge of managing selection

getSymbolPropertiesAndNotify
getSymbolPropertiesAndNotify()
(AJAX) Called when we receive information on a yet unknown symbol that has just been selected. Create it and get its properties.

getTileUrl
getTileUrl(p0, zl)
(AJAX) called through Google map. Retrieves the JViews tile image and send the symbol list AJAX request.
Parameters:
p0
zl

getVisibleLayers
getVisibleLayers()
Get the list of visible layers

isCapabilitiesLoaded
isCapabilitiesLoaded()
Indicates if capabilities (i.e. layer list) are loaded.

isDynamicLayer
isDynamicLayer(layer)
Dynamic layers, as per capabilities
Parameters:
layer - the layer.

isLayerVisible
isLayerVisible(layer)
Indicates whether a layer is visible
Parameters:
layer - the layer.

isNodeMovable
isNodeMovable()
Returns true when the elements in the view can be moved.

isReuseIcon
isReuseIcon(layer)
Indicates whether the reuse icon flag is set for the layer
Parameters:
layer - The layer to change.

isTiled
isTiled()
We don't want tiled view behaviour

moveID
moveID(id, lat, lon)
Moves a marker.
Parameters:
id - the symbol id.
lat - the desired latitude.
lon - the desired longitude.

onload
<static> IlvGoogleMapView.onload(client)
Initializes the view. This method must be called on the onLoad event of the page containing the view.
Parameters:
client - the view.

performJSFAction
performJSFAction(mb, params)
Performs an predefined action that will invoke the specified method binding.

This action will be executed before the capabilities request.
The signature of the method must be void methodName (IlvDiagrammer, String[]) where the first parameter is the IlvDiagrammer instance used to draw the diagram and the second parameter is the array of action parameters. The action must only change the IlvDiagrammer instance as only the image is refreshed (the JSF components are not). If the view is a dashboard view, simply cast the IlvDiagrammer into an IlvDashboardDiagram.

Parameters:
mb - The method binding to invoke
params - The action parameters as a array of Strings.

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.

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

selectID
selectID(id)
Selects a marker.
Parameters:
id

setAbsoluteId
setAbsoluteId(absId)
Sets the absolute identifier of the server side JavaServer Faces component.
Parameters:
absId - The absolute identifier of the component.

setCenter
setCenter(lat, lon, level)
Sets the map initial center and zoom level.
Parameters:
lat - the latitude of the center.
lon - the longitude of the center.
level - the google zoom level.

setControls
setControls(list)
Sets the list of control classes.
Parameters:
list - comma separated names of Google control classes.

setLayerVisible
setLayerVisible(layer, visible, update)
Changes the visibility state of a layer
Parameters:
layer - the layer.
visible - the layer desired visibility.
update - indicates whether we should force a layer update.

setNodeMovable
setNodeMovable(nodeMovable)
Allows or forbids to move elements in the view. Default is false.
Parameters:
nodeMovable - indicates whether nodes can be dragged around.

setRequestParameters
setRequestParameters(key, value)
Utility method to register an additional parameter that will be sent on all server requests.
Parameters:
key - the parameter name.
value - the parameter value.

setReuseIcon
setReuseIcon(layer, reuse)
Indicates to reuse the marker icons for a specific layer. If set to true, the icon will be cached and will limit the server roundtrips.
Parameters:
layer - The layer to change.
reuse - indicates if all symbols share the same icon. By default, reuse icons is false for all layers

setServletClass
setServletClass(servletClass)
Sets the class of the servlet that generates the image that will be instantiated, if needed, by the controller servlet.
Parameters:
servletClass - The class of the servlet that generates the image. This should be the name of a Java subclass of ilog.views.maps.servlet.IlvFacesMapsServlet.

setServletURL
setServletURL(servletURL)
Sets the URL of the image generating servlet.
Parameters:
servletURL - The image generating servlet URL.

update
update(layerUpdated)
Refresh overlays
Parameters:
layerUpdated - the optional layer name that required refreshing.

updateMarkers
updateMarkers(layers, x, y, w, h)
Send an AJAX request to retrieve the list of symbols in the layer and bounding box passed
Parameters:
layers
x
y
w
h

updateSymbol
updateSymbol(s)
Create or replace a google map marker
Parameters:
s - the symbol data.

updateSymbols
updateSymbols(symbolList)
(AJAX) Called when the server returns the list of symbols. Create a marker per JSON object.
Parameters:
symbolList - the array of symbol data.

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