Class Index

Global Variables

Classes


Class MVThemeBasedFOI

MVThemeBasedFOI defines a theme based FOI layer. A theme based FOI layer displays a collection of interactive features of interest (FOIs) that meet certain query criteria specified in a predefined MapViewer theme. The geographic entities (geometries), non-geographic attributes and rendering styles of the theme based FOI layer are all stored in the database and served by the FOI server, which is a servlet running as part of the MapViewer server. The typical FOI server URL is http://hostname:port/mapviewer/foi.

Class Summary
Constructor Attributes Constructor Name and Description
 
MVThemeBasedFOI(layerName, theme, FOIServerURL)
Method Summary
Method Attributes Method Name and Description
 
This method aborts current server side theme rendering.
 
addEventListener(eventType, listener)
This method is deprecated.
 
addStyle(style)
Adds a dynamically created style to be used by this theme based FOI layer.
 
attachEventListener(eventType, listener)
This method attaches an event listener to the theme-based FOI layer.
 
This method automatically adjusts the map center so that the map is centered at the center of the theme minimal bounding box.
 
deHighlight(foiIdArray)
This method changes the FOIs, which are specified by an array of FOI IDs, from highlighted status to non-highlighted status.
 
Deletes all previously added dynamic styles.
 
deleteStyle(style)
Deletes a previously added style object
 
detachEventListener(eventType, listener)
This method detaches an event listener that has previously been attached to the map by #attachEventListener.
 
enableAutoWholeImage(autoWholeImage, wholeImageThreshold, clickableThreshold)
This method sets whether to let mapviewer automatically decide when to render the theme as a whole image and when to disable FOI clicking.
 
This method enables event propagation from the theme based FOI layer.
 
enableHighlight(enabledOrNot, clickHilite)
This method enables or disables highlighting individual FOIs of the theme.
 
This method sets whether to turn on FOI image caching.
 
This method sets whether to render and display polygon or polyline FOI images on the map.
 
enableInfoTip(enabled)
This method enables or disables the display of information tips when the mouse moves over FOIs that belong to the theme-based FOI layer.
 
This method enables or disables the display of the information window when the used clicks on FOIs that belong to the theme-based FOI layer.
 
This method enables or disables the display of the information window when the mouse moves over FOIs that belong to the theme-based FOI layer.
 
enableLabels(enable)
This method sets whether to render polygon FOI images with labels.
 
enableMarkerSequence(enabled, type)
This method turns on or off sequence for point FOIs.
 
This methods sets whether to enable multi-feature markers.
 
Get all previously added dynamic styles.
 
This method gets the currently set filtering geometry.
 
This method gets all theme-based FOI data entries that belong to the theme-based FOI layer and are displayed on the map.
 
This method gets the data entries of the highlighted FOIs.
 
This method gets the name of theme based FOI layer, which is specified when creating a new MVThemeBasedFOI object.
 
This method gets the mininum bounding box of all features currently being displayed.
 
This method gets the query window used to fetch FOI data.
 
Get a previously added dynamic styles by given name.
 
This method gets the name of the theme.
 
highlight(foiIdArray)
This method highlights the FOIs which are specified by an array of FOI IDs.
 
This method gets the visibility of the theme-based FOI layer.
 
Return whether the theme is currently displayed as a whole image.
 
reDraw(foi)
Redraw an FOI or the whole theme based FOI layer without refetching FOI data from the server side.
 
refresh(zoomToTheme)
This method refreshes a theme-based FOI layer.
 
setAutoRefresh(enabled)
This method sets whether to automatically refresh the theme-based FOI layer when the map is panned or recentered.
 
setBoundingTheme(enabled, recenterOnly)
This method set whether to make the theme defined in the MVThemeBasedFOI object a bounding theme.
 
This method specifies whether to bring FOI images to the top of the map when the mouse moves over FOI images belonging to the theme-based FOI layer.
 
setClickable(enabled)
Enables or disables theme-based FOI clicking.
 
setEventListener(eventType, listener)
This method is deprecated.
 
This method sets the filtering geometry that can be used in highlight-only mode.
 
setHighlightMarkerImage(imageURL, width, height)
This method enables an application to use a custom image, instead of an image rendered by the FOI server, as the FOI marker image when it is highlighted.
 
This method specifies the mode for mouse click highlighting the FOI.
 
This method toggles this theme based FOI layer between regular and highlight-only mode.
 
setHighlightStyle(highliteStyle)
This method specifies the rendering style of the highlighted FOIs.
 
setImageFormat(format, bgColor)
This method sets the image format and background color to be used to render FOI images.
 
setInfoWindowStyle(style, styleParameters)
The function sets the style of the information window displayed when the theme-based FOI layer is clicked.
 
By default, the FOI name is displayed as the info window title.
 
Some pre-defined themes may have their label texts translated into multiple languages.
 
setLayoutCustomizer(customizer)
This method assigns a custom FOI display function to the theme-based FOI layer.
 
setMarkerImage(imageURL, width, height)
This method enables an application to use a custom image, instead of an image rendered by the FOI server, as the FOI marker image.
 
This method sets the maximum zoom level at which the layer is enabled and visible.
 
This method sets the maximum zoom level on which the theme is rendered as a whole image, instead of individual FOI images.
 
set the minimal zoom level that them-based FOIs are clickable.
 
This method sets the minimum zoom level at which the layer is enabled and visible.
 
setMouseCursorStyle(cursorStyle)
This method sets the mouse cursor style when the mouse is over the theme based FOI layer.
 
setNSDP(nsdp)
Sets the Non-Spatial Data Provider object on this FOI layer.
 
setOpacity(opacity)
This method sets the opacity for theme.
 
This method sets the query parameters for the theme-based FOI layer that is based on a templated predefined theme.
 
This method sets the size multiplier of the query window used to query the theme-based FOI layer.
 
setRenderingStyle(styleName, styleName)
Sets the name of an overriding rendering style to be used by the predefined-theme associated with theme-based FOI.
 
setScreenOffset(xOffset, yOffset)
This method sets the screen display offset of the FOIs.
 
setVisible(visibility)
This method sets the visibility of the theme-based FOI layer.
 
Adjust the map center and zoom level to best display given FOIs.
 
This method automatically adjusts the map center and zoom level so that all theme features can be displayed inside the map window.
Class Detail
MVThemeBasedFOI(layerName, theme, FOIServerURL)
Parameters:
{String} layerName
layerName is a string that uniquely identifies the theme-based FOI layer.
{String} theme
theme is a string that specifies the predefined theme on which this theme-based FOI layer is based. It is specified in the form data-source-name.theme-name, where theme-name is the name of the predefined MapViewer theme and data-source-name is the name of the MapViewer data source in which the theme is defined.
{String} FOIServerURL
FOIServerURL is an optional parameter. It is a string that specifies the URL of the FOI server, which should be in the form http://host:port/mapviewer/foi. If you omit this parameter, its value is derived from the MapViewer base URL.
Returns:
The newly created ThemeBased FOI object.
Method Detail
{void} abort()
This method aborts current server side theme rendering.
Returns:
None

{void} addEventListener(eventType, listener)
This method is deprecated. Please use #setEventListener instead.
Parameters:
eventType
listener

{void} addStyle(style)
Adds a dynamically created style to be used by this theme based FOI layer.
Parameters:
{Object} style
the style object created by the client
Returns:
None

{void} attachEventListener(eventType, listener)
This method attaches an event listener to the theme-based FOI layer. One of the following types of event listeners can be associated with the theme-based FOI layer through this method: MVEvent.BEFORE_REFRESH, MVEvent.AFTER_REFRESH, MVEvent.MOUSE_CLICK, MVEvent.MOUSE_RIGHT_CLICK, MVEvent.MOUSE_OVER, MVEvent.MOUSE_OUT and MVEvent.MOUSE_MOVE.

The event type can be any of the following:

The MVEvent.BEFORE_REFRESH and MVEvent.AFTER_REFRESH listener functions should not have any parameter.

Other event listener functions should declare three parameters in the following order: (1) a point geometry that will contain the coordinate of the mouse click specified in map data coordinate system, (2) an FOI data entry object that will contain the attributes of the FOI object (see the MVThemeBasedFOI.getFOIData method) that you clicked on. MapViewer will construct and pass the actual values for these parameters into your listener function, and (3) the actual mouse event object that you can use in your function.

Parameters:
{String} eventType
eventType is one of the following string values identifying the event type: MVEvent.BEFORE_REFRESH, MVEvent.AFTER_REFRESH, MVEvent.MOUSE_CLICK, MVEvent.MOUSE_RIGHT_CLICK, MVEvent.MOUSE_MOVE, MVEvent.MOUSE_OVER or MVEvent.MOUSE_OUT.
{Function} listener
listener is a reference to the JavaScript listener function.
Returns:
None

{void} centerToTheme()
This method automatically adjusts the map center so that the map is centered at the center of the theme minimal bounding box.
Returns:
None

{void} deHighlight(foiIdArray)
This method changes the FOIs, which are specified by an array of FOI IDs, from highlighted status to non-highlighted status.
Parameters:
{Array} foiIdArray
an array of FOI IDs, and those FOIs will be changed from highlighted status to non-highlighted status. All highlighted FOIs will be changed to non-highlighted status if it is omitted.
Returns:
None

{void} deleteAllStyles()
Deletes all previously added dynamic styles.
Returns:
None

{void} deleteStyle(style)
Deletes a previously added style object
Parameters:
{Object} style
the style object created by the client
Returns:
None

{void} detachEventListener(eventType, listener)
This method detaches an event listener that has previously been attached to the map by #attachEventListener.
Parameters:
{string} eventType
one of the following string values identifying the type of event listener: MVEvent.BEFORE_REFRESH, MVEvent.AFTER_REFRESH, MVEvent.MOUSE_CLICK, MVEvent.MOUSE_RIGHT_CLICK, MVEvent.MOUSE_OVER or MVEvent.MOUSE_OUT.
{string} listener
specifying the listener function.
Returns:
None

{void} enableAutoWholeImage(autoWholeImage, wholeImageThreshold, clickableThreshold)
This method sets whether to let mapviewer automatically decide when to render the theme as a whole image and when to disable FOI clicking.

Rendering the theme as a whole image reduces the number of individual images rendered by the server and displayed by the client. Disabling FOI clicking reduces the amount of data transferred from server and simplies client rendering. Doing both together can effectively improve theme rendering performance when the theme has a very large number of features that need to be rendered on the client side.

The only drawback of rendering the theme as a whole image is that it blocks mouse interaction of other themes beneath it.

Mapviewer decides when to render the theme as a whole image and when to disable FOI clicking based on the number of rendered features. You can customize the criteria used by mapviewer with two parameters. Mapviewer has its own default criteria, which is used when these two parameters are not specified.

Parameters:
{boolean} autoWholeImage
a boolean that specifies whether to let mapviewer automatically decide when to render the theme as a whole image and when to disable FOI clicking.
{int} wholeImageThreshold
An integer. The theme is rendered as a whole image when the number of rendered features is greater than wholeImageThreshold..
{int} clickableThreshold
An integer. The theme is rendered as clickable when the number of rendered features is greater than clickableThreshold.
Returns:
None

{void} enableEventPropagation(enabled)
This method enables event propagation from the theme based FOI layer. When event propagation is enabled, events such as mouse clicks and keyboard strokes are propagated to the rest of the map client instance after they are handled inside the theme based FOI layer. When event propagation is diabled, events are trapped inside the theme based FOI layer and not propapated outside. The latter is usally prefered when the theme based FOI layer to handle some events that should only occur to the theme based FOI layer itself. By default, event propagation for theme based FOI layer is enabled.
Parameters:
{boolean} enabled
true (enable event propagation) or false (disable event propagation).
Returns:
None

{void} enableHighlight(enabledOrNot, clickHilite)
This method enables or disables highlighting individual FOIs of the theme. A FOI can be highlighted programmatically by #highlight, or simply by mouse click, which is enabled by default. If mouse click highlighting is not desired, you can turn it off by setting the clickHilite parameter to false. If enabledOrNot is true, FOI highlighting is enabled. By default, will be highlighted when it is clicked, by default.
Parameters:
{boolean} enabledOrNot
a boolean value which indicates whether or not to enable highlighting the FOI.
{boolean} clickHilite
a boolean value which indicates whether or not to enable mouse click highlighting.
Returns:
None

{void} enableImageCaching(enable)
This method sets whether to turn on FOI image caching. If set to true, the image rendered for each FOI is cached by the FOI server, which improves FOI rendering performance. FOI image caching should be turned on if the FOI images do not change over time. It should be turned off if the FOI images might change and have to be rerendered, when any of the FOI geometries are modified or any non-geometry attributes used for advanced style rendering are modified so that the FOI rendering style has to be changed accordingly.
Parameters:
{boolean} enable
true (FOI image caching on) or false (FOI image caching off).
Returns:
None

{void} enableImageRendering(enable)
This method sets whether to render and display polygon or polyline FOI images on the map. If being set to false, no FOI images will be rendered by the FOI server and displayed on the map. If the theme is clickable at the same time, all non-spatial FOI attributes will still be fetched from the FOI server and the map areas corresponding to the FOI geometries will be still clickable, which can be useful when the FOI geometries are already displayed as part of the cached map tiles.
Parameters:
{boolean} enable
true (render FOI iamges) or false (do not render FOI images).
Returns:
None

{void} enableInfoTip(enabled)
This method enables or disables the display of information tips when the mouse moves over FOIs that belong to the theme-based FOI layer. When the display of information tips is enabled, the user-supplied information string is displayed whenever the mouse moves over its associated FOI on the map. The information tip is closed when the mouse moves out of the FOI.
Parameters:
{Boolean} enabled
enabled is a Boolean true (enable the display of information tips) or false (disable the display of information tips).
Returns:
None

{void} enableInfoWindow(enabled)
This method enables or disables the display of the information window when the used clicks on FOIs that belong to the theme-based FOI layer. When the display of the information window is enabled, a window containing the user-supplied information string is displayed whenever the user clicks on its associated FOI on the map. The information window is closed when the user next clicks the mouse.
Parameters:
{Boolean} enabled
enabled is a Boolean true (enable the display of the information window) or false (disable the display of the information window).
Returns:
None

{void} enableInfoWindowForMouseOver(enabled)
This method enables or disables the display of the information window when the mouse moves over FOIs that belong to the theme-based FOI layer. When the display of the information window is enabled, a window containing the user-supplied information string is displayed whenever the user moves mouse over its associated FOI on the map. The information window is closed when the mouse leaves the FOIs.
Parameters:
{Boolean} enabled
enabled is a Boolean true (enable the display of the information window for mouse over) or false (disable the display of the information window for mouse over).
Returns:
None

{void} enableLabels(enable)
This method sets whether to render polygon FOI images with labels. If set to true, the polygon FOI images will be labeled with values of the theme label column.
Parameters:
{boolean} enable
true (render FOI label) or false (do not render FOI label).
Returns:
None

{void} enableMarkerSequence(enabled, type)
This method turns on or off sequence for point FOIs. When sequence is turned on, a sequence identifier, either a number or an alphabetic letter, is rendered on top of the FOI marker. This method has no effect on polygon or polyline FOIs. The sequence identifier assigned to each FOI marker is determined by the index of the corresponding FOI data entry in the theme-based FOI data array returned by method #getFOIData. For example, if an FOI is the first element in the FOI data array, the sequence identifier on its corresponding marker on the map will be 1(numerical), or A(alphabetic). Similiarly, if an FOI is the third element in the FOI data array, the sequence identifier on its corresponding marker on the map will 3(numerical) or C(alphabetic). This is no limit on the number of different numerical sequence identifiers, while the number of different alphabetic sequence identifiers can not exceed 26(A-Z).
Parameters:
{boolean} enabled
a boolean that specifies whether to turn on sequence number
{String} type
an optional String that specifies the type of sequence number. It can be either "N" (numerical) or "A" (Alphabetic).
Returns:
None

{void} enableMultiFeatureMarker(enabled)
This methods sets whether to enable multi-feature markers. A multi-feature marker represents multiple point FOIs that are located at the exactly same location. When you click or move mouse over such a marker, the list of FOIs will be displayed in a popup window.
Parameters:
{Boolean} enabled
true (enable multi-feature markers) or false (disable multi-feature markers).
{Object} options.
An object that that may have up to three attributes, style, listHeight and listWidth. style specifies the multi-feature marker style. listHeight and listWidth specify the max size of the popup window.
Returns:
None

{Array} getAllStyles()
Get all previously added dynamic styles.
Returns:
The array of Style object

{void} getFilteringGeom()
This method gets the currently set filtering geometry.
Returns:
currently set filtering geomtery object.

{Array} getFOIData()
This method gets all theme-based FOI data entries that belong to the theme-based FOI layer and are displayed on the map.

The returned FOI data entries are specified by an array, each element of which specifies one FOI data entry, which has the following attributes:

Theme data is loaded asynchronously. As the result, theme data might not have been loaded right after theme is added to the MVMapView instance or MVThemeBasedFOI.refresh is called. To ensure the theme data has been loaded when calling this method, you should call it inside a theme AFTER_REFRESH listener.

Returns:
The array of FOI data entries.

{void} getHighlightedFOIData()
This method gets the data entries of the highlighted FOIs. The returned FOI data entries are specified by an array, each element of which specifies one FOI data entry, which is explained at #getFOIData.
Returns:
None

{String} getLayerName()
This method gets the name of theme based FOI layer, which is specified when creating a new MVThemeBasedFOI object.
Returns:
The name of the theme based FOI layer.

{MVSdoGeometry} getMBR()
This method gets the mininum bounding box of all features currently being displayed.
Returns:
An MVSdoGeometry object that specifies the layer MBR, using the coordinate system associated with the map data.

{MVSdoGeometry} getQueryWindow()
This method gets the query window used to fetch FOI data.
Returns:
An MVSdoGeometry object that specifies the query window, using the coordinate system associated with the map data.

{Array} getStyleByName(Style)
Get a previously added dynamic styles by given name.
Parameters:
{String} Style
name
Returns:
a Style object

{String} getThemeName()
This method gets the name of the theme.
Returns:
The name of the theme

{void} highlight(foiIdArray)
This method highlights the FOIs which are specified by an array of FOI IDs.
Parameters:
{Array} foiIdArray
an array of FOI IDs, and those FOIs will be highlighted. All FOIs, which are returned from the server currently, will be highlighted if it is omitted.
Returns:
None

{Boolean} isVisible()
This method gets the visibility of the theme-based FOI layer.
Returns:
true if the theme-based FOI layer is currently visible, false if the theme-based FOI layer is not currently visible.

{boolean} isWholeImage()
Return whether the theme is currently displayed as a whole image.
Returns:
True if the theme is displayed as a whole image theme, false otherwise.
See:
#setMaxWholeImageLevel

{void} reDraw(foi)
Redraw an FOI or the whole theme based FOI layer without refetching FOI data from the server side. You can use this method to redraw the theme based FOI layer after modifying the content of the FOI data entries.
Parameters:
{FOI} foi
The FOI data object to be redrawn. The whole layer will be redrawn if this parameter is null or omitted.
Returns:
none

{void} refresh(zoomToTheme)
This method refreshes a theme-based FOI layer. As the result of the call, a new theme-based FOI layer request is sent from the client to the FOI server, the theme-based FOI data is re-fetched, and the data is displayed inside the map. If the zoomToTheme flag is set to true, then the result map will be bounded by the features of the refreshed theme.
Parameters:
{Boolean} zoomToTheme
a Boolean that specifies whether the map is to be zoomed to covers all features of the refreshed theme. If set to true, the zoom level and the center of the map is adjusted to cover all features of the refreshed theme.
Returns:
None

{void} setAutoRefresh(enabled)
This method sets whether to automatically refresh the theme-based FOI layer when the map is panned or recentered.
Parameters:
{Boolean} enabled
enabled is a Boolean true (the theme-based FOI will be refreshed when the map is panned or recentered) or false (he theme-based FOI will not be refreshed when the map is panned or recentered).
Returns:
None

{void} setBoundingTheme(enabled, recenterOnly)
This method set whether to make the theme defined in the MVThemeBasedFOI object a bounding theme. When the MapView object is initialized, the map center and zoom level will be automatically adjusted so that all bounding theme features will be visible inside the map window.
Parameters:
{Boolean} enabled
a boolean value that specifies whether to make the theme
{Boolean} recenterOnly
a boolean value that specifies whether to only recenter the map. If true, the map will be only recentered to the center of the theme without changing the current zoom level. a bounding theme.
Returns:
None

{void} setBringToTopOnMouseOver(enabled)
This method specifies whether to bring FOI images to the top of the map when the mouse moves over FOI images belonging to the theme-based FOI layer. By default, an FOI image will not be brought to top when mouse moves over it. f
Parameters:
{Boolean} enabled
a Boolean true (bring FOI images to the top) or false (do not bring FOI images to the top).
Returns:
None

{void} setClickable(enabled)
Enables or disables theme-based FOI clicking. If theme-based FOI clicking is disabled, no listener function will be fired when the user clicks the FOI images belonging to the theme-based FOI layer.
Parameters:
{Boolean} enabled
enabled is a Boolean true (theme-based FOI is clickable) or false (theme-based FOI is not clickable).
Returns:
None

setEventListener(eventType, listener)
This method is deprecated. Please use #attachEventListener instead.
Parameters:
eventType
listener

{void} setFilteringGeom(geom)
This method sets the filtering geometry that can be used in highlight-only mode.
Parameters:
{Object} geom
the filtering geometry; must be a MVSdoGeometry instance.
Returns:
None

{void} setHighlightMarkerImage(imageURL, width, height)
This method enables an application to use a custom image, instead of an image rendered by the FOI server, as the FOI marker image when it is highlighted. If this method is called, the rendering style defined in the predefined theme is ignored, and no FOI image is rendered by the FOI server. This method only applies to point features.
Parameters:
{String} imageURL
imageURL is a string that specifies the URL of the user-defined marker image.
{int} width
width is an integer that specifies the width of the marker.
{int} height
height is an integer that specifies the height of the marker.
Returns:
None

{void} setHighlightMode(mode)
This method specifies the mode for mouse click highlighting the FOI. There are two modes that you can select from, "single" and "multiple". When in "single" mode, only a single FOI can be highlighted at any time. When in "multiple" mode, multiple FOIs may be highlighted at any time.

When you invoke #highlight to programmatically highlight FOIs, you will always be in the "multiple" highlighting mode.

Parameters:
{String} mode
A string which specifies the mode for highlighting the FOI. It can be either "single" or "multiple".
Returns:
None

{void} setHighlightOnly(enabled)
This method toggles this theme based FOI layer between regular and highlight-only mode. When set to true, this theme will display only the features that are within a specified filtering geometry using a "highlight" style. The filtering geometry (a rectangle or a polygon for instance) is typically created using the MVRectangleTool or MVRedLineTool. But it can be any valid MVSdoGeometry object.
The highlight style is typically specified on the pre-defined theme's definition (set through the Map Builder tool). But you can also use the setRenderingStyle() method of this class to set the name of the highlight style at run time.
When this flag is set to false (the default value), this object behaves as a regular theme based FOI layer. When set to true, you must also set a filtering geometry and an optional rendering style before adding this object to your MVMapView handle.
Note that this method is only applicable to pre-defined theme based FOI layers. It has no effect on JDBC (Dynamic) theme based FOI. It is also advised that the pre-defined theme itself should not contain any binding variables in its query condition.
If you wish to highlight a JDBC theme based FOI layer, one approach is to simply modify the JDBC theme's query to include a SDO_FILTER clause. The SDO_FILTER clause will need the filter geometry's cooridnates which can be obtained from the Redline tool (or whatever tool you used to generate/draw the filtering geometry). Don't forget to add the "asis" attribute to your JDBC theme definition and set its value to "true" so that MapViewer will not attempt to add additional spatial filtering of its own.
Parameters:
{boolean} enabled
true (highligh-only mode) or false (regular mode).
Returns:
None

{void} setHighlightStyle(highliteStyle)
This method specifies the rendering style of the highlighted FOIs. It can either be a string that specifies the style in the form of ., or a style object of one of the following types, MVStyleMarker, MVStyleColor and MVXMLStyle etc.
Parameters:
{Object} highliteStyle
A string or style object which specifies the rendering style of the highlighted FOIs. If it is a string, the string should be in the form of ., where is the name of the style which is defined in the USER_SDO_STYLES view, and is the name of the data source in which the style is defined. If it is a style object, it should be of type MVStyleMarker, MVStyleColor and MVXMLStyle etc.
Returns:
None

{void} setImageFormat(format, bgColor)
This method sets the image format and background color to be used to render FOI images.

The image format can be either png8 or png24. Png8 is faster especially with IE, but it only supports 256 colors and does not support semi-transparency. Png24 supports semi-transparency and much richer colors. The default FOI image format is png24.

You can also specify the image background color if the image format is png8. The color should in defined in the form of "#rrggbb". The background color will be made transparent in the result images. Therefore you should choose a color that is not used in the FOI image foreground. The default background color is #a8a8a9.

Parameters:
{String} format
the FOI image format.
{String} bgColor
the background color for png8.
Returns:
None

{void} setInfoWindowStyle(style, styleParameters)
The function sets the style of the information window displayed when the theme-based FOI layer is clicked. If you don't set it, the info window will be shown with the default style.
Parameters:
{String} style
the name of the info window style; possible values are "MVInfoWindowStyle1", "MVInfoWindowStyle2" and "MVInfoWindowStyle3".
{Object} styleParameters
the object that specifies the custom style parameters, which are effective only when the info window style is "MVInfoWindowStyle1". Please refer to MVMapView#setDefaultInfoWindowStyle for more information.
Returns:
None
See:
MVMapView#setDefaultInfoWindowStyle

{void} setInfoWindowTitle(title)
By default, the FOI name is displayed as the info window title. This method changs the info window title to a given string. The info window title is displayed only when the info window style is "MVInfoWindowStyle1".
Parameters:
{String} title
the info window title string.
Returns:
None

setLabelLanguageCode(lang_code)
Some pre-defined themes may have their label texts translated into multiple languages. For such themes, you can specify a language code so that MapViewer labels the feagtures using the texts for the given language. Must be a 2 letter language code, followed by an optional 2-letter country code (separated by dash '-'), for example "zh" or "zh-cn". The language codes are defined by ISO-639. You can find a full list of these codes at a number of sites, such as: http://www.loc.gov/standards/iso639-2/englangn.html If no translated texts for the specified language code are found, the English texts (or whatever default texts for the theme) will be used for labeling.
Parameters:
lang_code

{void} setLayoutCustomizer(customizer)
This method assigns a custom FOI display function to the theme-based FOI layer. It enables the application to display the FOI images in a customized way. The custom FOI display function is called after the FOI data is fetched from the server and before each FOI is displayed on the map. Inside this function, the application can define the HTML string for each FOI. As the result, the HTML string, instead of the FOI image rendered by the FOI server, will be displayed on the map. The application can also set the offset of the HTML string relative to the original FOI location. Here is an example.
   function customizer (foi)
   {
     foi.html = foi.attrs[1];
     foi.xoffset = 14;
     foi.yoffset = 14;
   }
   
Parameters:
{Function} customizer
the custom FOI display function
Returns:
None

{void} setMarkerImage(imageURL, width, height)
This method enables an application to use a custom image, instead of an image rendered by the FOI server, as the FOI marker image. If this method is called, the rendering style defined in the predefined theme is ignored, and no FOI image is rendered by the FOI server. This method only applies to point features.
Parameters:
{String} imageURL
imageURL is a string that specifies the URL of the user-defined marker image.
{int} width
width is an integer that specifies the width of the marker.
{int} height
height is an integer that specifies the height of the marker.
Returns:
None

{void} setMaxVisibleZoomLevel(maxZoom)
This method sets the maximum zoom level at which the layer is enabled and visible. The FOI layer will be disabled and hidden whenever the map is zoomed in beyond the maximum visible zoom level (map zoom level is greater than the maximum visible zoom level).
Parameters:
{int} maxZoom
maxZoom is a integer that specifies the minimum zoom level.
Returns:
None

{void} setMaxWholeImageLevel(maxLevel)
This method sets the maximum zoom level on which the theme is rendered as a whole image, instead of individual FOI images. The theme is rendered as individual FOI images when the map is zoomed in beyond the maximum whole image theme zoom level.

Rendering the theme as a whole image reduces the number of individual images rendered by the server and displayed by the client. It is a very effective way to improve theme rendering performance when the theme has a very large number of features that need to be rendered on the client side.

The only drawback of rendering theme as a whole image is that it blocks mouse interaction of other themes beneath it.

Parameters:
{int} maxLevel
maxLevel is a number that specifies the maximum whole image theme level.
Returns:
None

{void} setMinClickableZoomLevel(level)
set the minimal zoom level that them-based FOIs are clickable. The theme-based FOIs are not clickable when the map is zoomed out beyond the minimal clickable zoom level (map zoom level is smaller than the level specified zoom level).

Disabling theme clicking greatly reduces the amount of data transferred from server to cient and simplies client rendering. When used with whole image theme rendering, it can effectively improve theme rendering performance when the theme has a very large number of features that need to be rendered on the client side.

Parameters:
{int} level
level is an number that define the minimal theme-based FOIs clickable zoom level.
Returns:
None

{void} setMinVisibleZoomLevel(minZoom)
This method sets the minimum zoom level at which the layer is enabled and visible. The FOI layer will be disabled and hidden whenever the map is zoomed out beyond the minimum visible zoom level (map zoom level is less than the minimum visible zoom level).
Parameters:
{int} minZoom
minZoom is a integer that specifies the minimum zoom level.
Returns:
None

{void} setMouseCursorStyle(cursorStyle)
This method sets the mouse cursor style when the mouse is over the theme based FOI layer.
Parameters:
{String} cursorStyle
A string that specifies the cursor style to be used, which must be one of the standard CSS cursor style names such as "crosshair", "pointer" and "move".
Returns:
None

{void} setNSDP(nsdp)
Sets the Non-Spatial Data Provider object on this FOI layer.
Parameters:
{MVNSDP} nsdp
the NSDP object containing info needed by the FOI server to join Non-Spatial data and the associated theme's spatial table.
Returns:
None

{void} setOpacity(opacity)
This method sets the opacity for theme.
Parameters:
{int} opacity
The parameter opacity should be a number between 0 and 1.
Returns:
None

{void} setQueryParameters(vararg)
This method sets the query parameters for the theme-based FOI layer that is based on a templated predefined theme. The number of parameters is corresponding to the theme definition. Each parameter can be a number, a string, a MVSdoGeometry object or a MVArrayParameter object.
Parameters:
vararg
a list of parameters corresponding to the required number of binding variables in the predefined theme
Returns:
None

{void} setQueryWindowMultiplier(multiplier)
This method sets the size multiplier of the query window used to query the theme-based FOI layer. The size multiplier is the ratio of query window width and height to the map container DIV object width and height, respectively. That is, the size multiplier on the X dimension is (query window width)/(map container width), and the size multiplier on the Y dimension is (query window height)/(map container height). By default, the size multiplier of the query window on both the X the Y dimensions is 2; that is, by default the query window of the theme-based FOI layer is twice as large as the map container DIV object on both dimensions.
Parameters:
{float} multiplier
multiplier is a floating point number that specifies the ratio along the X (width) and Y (height) dimensions.
Returns:
None

{void} setRenderingStyle(styleName, styleName)
Sets the name of an overriding rendering style to be used by the predefined-theme associated with theme-based FOI.
Note that the style will be ignored if this FOI layer is based on a dynamic (JDBC) theme, for which you need to specify its render/label styles through its own element.
Parameters:
{String} styleName
the name of the style to be used as rendering style by the associated theme. Note that it could reference a dynamically created style.
{String} styleName
name of the style
Returns:
None

{void} setScreenOffset(xOffset, yOffset)
This method sets the screen display offset of the FOIs. It allows you to fine tune the positioning of the FOI markers by shifting the FOIs from the default locations by certain screen pixels.
Parameters:
{int} xOffset
horizontal offset in screen pixels. Positive value shifts the FOIs towards right and negative value shifts the FOIs towards left.
{int} yOffset
vertical offset in screen pixels. Positive value shifts the FOIs downwards and negative value shifts the FOIs upwards.
Returns:
None

{void} setVisible(visibility)
This method sets the visibility of the theme-based FOI layer.
Parameters:
{Boolean} visibility
a Boolean true (make the layer visible) or false (make the layer not visible).
Returns:
None

{void} zoomToFeatures(Array)
Adjust the map center and zoom level to best display given FOIs. The FOIs are specified by an FOI data entry array. The FOI data entries must come from the result of a #getFOIData call.
Parameters:
{Array} Array
of the FOI data entries
Returns:
none

{void} zoomToTheme()
This method automatically adjusts the map center and zoom level so that all theme features can be displayed inside the map window.
Returns:
None

Documentation generated by JsDoc Toolkit 2.1.0 on Fri Feb 25 2011 12:34:47 GMT-0500 (EST)