Class Index

Global Variables

Classes


Class MVFOI

MVFOI defines a feature of interest (FOI) object. An FOI object is a dynamic geographic feature on the map that can be interacted with. When creating such an FOI object, the application has to supply all feature attributes such as geographic definition(geometry) and rendering style.

Class Summary
Constructor Attributes Constructor Name and Description
 
MVFOI(foiId, geometry, style, FOIServerURL, foiWidth, foiHeight)
Method Summary
Method Attributes Method Name and Description
 
animateToNewLocation(newLocation, time)
This method moves the FOI to a new location in an animated manner.
 
attachEventListener(eventType, listener)
This method attaches an event listener function that is called whenever the specified event occurs with the individual FOI.
<static>  
MVFOI.createHTMLFOI(id, location, html, hOffset, vOffset)
This is a static function that creates an FOI that displays a user-supplied HTML feature on the map.
<static>  
MVFOI.createMarkerFOI(id, location, imageURL, width, height)
This is a static function that creates a marker FOI that displays the user-supplied marker image.
 
detachEventListener(eventType, listener)
This method detaches an event listener function that has previously been attached to this FOI by #attachEventListener.
 
This method enables event propagation from the FOI object.
 
enableInfoTip(enabled)
This method enables or disables the display of the information string when the mouse moves over the FOI.
 
This method enables or disables the information window when the FOI is clicked.
 
This method gets the geometry of the FOI.
 
This method gets the ID of the FOI.
 
This method gets the visibility of the FOI.
 
This method redraw the FOI if it is already displayed.
 
This method specifies whether to bring the FOI image to the top of the map when the mouse moves over it.
 
setClickable(clickable)
This method specifies whether the user-defined FOI is clickable.
 
setEventListener(eventType, listener)
This method is deprecated.
 
setHeight(height)
This method sets the height of the FOI image for a point FOI.
 
setHTMLElement(html, hOffset, vOffset)
This method adds an HTML element on top of the FOI.
 
setImageFormat(format, bgColor)
This method sets the image format and background color to be used to render the FOI image.
 
setInfoTip(infoTip)
This method specifies the information tip string to be associated with the FOI.
 
setInfoWindow(infoWinStr, width, height, style, title, styleParameters)
This method defines an information window for the FOI.
 
setMouseCursorStyle(cursorStyle)
This method sets the mouse cursor style when the mouse is over the FOI.
 
setOpacity(opacity)
This method sets the opacity for FOI image.
 
setRenderingStyle(style, width, height)
This method sets the FOI rendering style.
 
setTopFlag(topFlag)
If you want to display the FOI on the top and above all other FOIs, you should call this function after you create the new the FOI object.
 
setVisible(visible)
This method sets the visibility of the FOI.
 
setWidth(width)
This method sets the width of the FOI image for a point FOI.
 
setZIndex(idx)
This method sets the z-index (display order) value of the FOI.
 
This method will stop foi animating.
 
This method sets the geometry of the FOI.
 
updateImageURL(imgURL, width, height)
This method updates the URL of the image to be displayed as the FOI.
Class Detail
MVFOI(foiId, geometry, style, FOIServerURL, foiWidth, foiHeight)
Parameters:
{String} foiId
a string that uniquely identifies the FOI object.
{MVSdoGeometry} geometry
geometry is an MVSdoGeometry object that defines the FOI geometry.
{Object} style
style is a string that specifies the style pre-defined in the USER_SDO_STYLES view or a style object that defines a client side dynamic style. The pre-defined style is specified in the form data-source-name.style-name, where style-name is the name of the style and data-source-name is the name of the data source in which the style 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.
{int} foiWidth
an integer that specifies the width of the image marker rendered by the FOI server in screen pixels.
{int} foiHeight
an integer that specifies the height of the image marker rendered by the FOI server in screen pixels.
Returns:
The newly created FOI object.
Method Detail
animateToNewLocation(newLocation, time)
This method moves the FOI to a new location in an animated manner.
Parameters:
{MVSdoGeometry} newLocation
a point or polyline geometry that specifies the path along which the FOI moves. If it is a point geometry, the FOI will move along the straight line between its current location and the new location. If it is a polyline geometry, the FOI will move from its current location to the first shape point of the polyline and then move along the polyline until reach the last shape point.
{int} time
affects the FOI moving speed. The default value is 100. A larger value results in a slower movement.

{void} attachEventListener(eventType, listener)
This method attaches an event listener function that is called whenever the specified event occurs with the individual FOI. It supports the following types of events.
The listener function should expect three parameters. The first is a point type MVSdoGeometry object that specifies the mouse event location. The second specifies the MVFOI object with which the mouse event occurs. The third specifies the mouse event object.
Parameters:
{String} eventType
eventType is one of the following string values identifying the event type: MVEvent.MOUSE_CLICK, MVEvent.MOUSE_OVER , MVEvent.MOUSE_OUT, MVEvent.MOUSE_MOVE or MVEvent.MOUSE_RIGHT_CLICK.
{Function} listener
listener is a reference to the listener function.
Returns:
None

<static> {object} MVFOI.createHTMLFOI(id, location, html, hOffset, vOffset)
This is a static function that creates an FOI that displays a user-supplied HTML feature on the map. Applications can use this type of FOI to display any HTML content, such as DIV, IFRAME or Macromedia Flash content. The FOI server does not render FOI images for this type of FOI.
Parameters:
{String} id
id is a string that uniquely identifies the HTML FOI.
{MVSdoGeometry} location
location is a point MVSdoGeometry object that specifies the location of the FOI.
{String} html
html is an HTML string with content that you want to display.
{String} hOffset
hOffset is an integer that specifies the horizontal on-screen offset (in screen pixels) of the HTML feature, relative to location.
{String} vOffset
vOffset is an integer that specifies the vertical on-screen offset (in screen pixels) of the HTML feature, relative to location.
Returns:
The newly created FOI

<static> {object} MVFOI.createMarkerFOI(id, location, imageURL, width, height)
This is a static function that creates a marker FOI that displays the user-supplied marker image. The image file must be available online.
Parameters:
{String} id
id is a string that uniquely identifies the marker FOI.
{MVSdoGeometry} location
location is a point MVSdoGeometry object that specifies the location of the marker FOI.
{String} imageURL
imageURL is a string that specifies the URL of the user-supplied marker image.
{int} width
width is an integer that specifies the native width of the marker FOI image.
{int} height
height is an integer that specifies the native height of the marker FOI image.
Returns:
The newly created FOI.

{void} detachEventListener(eventType, listener)
This method detaches an event listener function that has previously been attached to this FOI by #attachEventListener.
Parameters:
{String} eventType
eventType is one of the following string values identifying the event type: MVEvent.MOUSE_CLICK, MVEvent.MOUSE_OVER, MVEvent.MOUSE_OUT or MVEvent.MOUSE_RIGHT_CLICK.
{Function} listener
listener is a reference to the listener function.
Returns:
None

{void} enableEventPropagation(enabled)
This method enables event propagation from the FOI object. 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 FOI object. When event propagation is diabled, events are trapped inside the FOI object and not propapated outside. The latter is usally prefered when the FOI needs to handle some events that should only occur to the FOI itself. By default, event propagation for FOI is enabled.
Parameters:
{boolean} enabled
true (enable event propagation) or false (disable event propagation).
Returns:
None

{void} enableInfoTip(enabled)
This method enables or disables the display of the information string when the mouse moves over the FOI.
Parameters:
{Boolean} enabled
enabled is a Boolean true (enable the display of the information string) or false (disable the display of the information string).
Returns:
None

{void} enableInfoWindow(enabled)
This method enables or disables the information window when the FOI is clicked. If it is enabled, an information window that displays the user-supplied HTML information string is displayed on the map when the FOI is clicked. The information window will be closed when the user clicks the Close button.
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

{SdoGeometry} getGeometry()
This method gets the geometry of the FOI.
Returns:
the FOI geometry

{String} getId()
This method gets the ID of the FOI.
Returns:
the ID of the FOI.

{Boolean} isVisible()
This method gets the visibility of the FOI.
Returns:
true if the FOI is visible, false if the FOI is invisible

{void} reDraw()
This method redraw the FOI if it is already displayed.
Returns:
None

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

{void} setClickable(clickable)
This method specifies whether the user-defined FOI is clickable. If set to false, then no mouse event will be fired, and the info window will not display when the user clicks on it.
Parameters:
{Boolean} clickable
a Boolean true (the FOI is clickable) or false (the FOI is not clickable).
Returns:
None

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

{void} setHeight(height)
This method sets the height of the FOI image for a point FOI. If the FOI is already displayed, it will not be redrawn untill the #reDraw method is called.
Parameters:
{int} height
the height of new marker style.
Returns:
None

{void} setHTMLElement(html, hOffset, vOffset)
This method adds an HTML element on top of the FOI. The HTML element is specified by a string that can contain any HTML content.
Parameters:
{String} html
html is an HTML string with content that you want to display.
{int} hOffset
hOffset is an integer that specifies the horizontal on-screen offset (in screen pixels) of the HTML feature, relative to the location of the FOI object in which the element is being added.
{int} vOffset
vOffset is an integer that specifies the vertical on-screen offset (in screen pixels) of the HTML feature, relative to the location of the FOI object in which the element is being added.
Returns:
None

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

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 image. 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} setInfoTip(infoTip)
This method specifies the information tip string to be associated with the FOI. If the display of information tips for the FOI is enabled, the string is displayed when the mouse moves over the FOI.
Parameters:
{String} infoTip
infoTip is the information string.
Returns:
None

{void} setInfoWindow(infoWinStr, width, height, style, title, styleParameters)
This method defines an information window for the FOI. The information window is displayed when the mouse clicks over the FOI and the display of information window for the FOI is enabled.
Parameters:
{String} infoWinStr
infoWinStr is the HTML string to be displayed in the information window.
{int} width
width is an integer that specifies the width (in screen pixels) of the information window.
{int} height
height is an integer that specifies the height (in screen pixels) of the information window.
{String} style
the name of the info window style; possible values are "MVInfoWindowStyle", "MVInfoWindowStyle1" and "MVInfoWindowStyle2".
{String} title
the title string to be displayed in the info window. This is effective only when the info window style is "MVInfoWindowStyle1".
{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} setMouseCursorStyle(cursorStyle)
This method sets the mouse cursor style when the mouse is over the FOI.
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} setOpacity(opacity)
This method sets the opacity for FOI image.
Parameters:
{int} opacity
The parameter opacity should be a number between 0 and 1.
Returns:
None

{void} setRenderingStyle(style, width, height)
This method sets the FOI rendering style. If the FOI is already displayed, it will not be redrawn untill the #reDraw method is called.
Parameters:
{Object} style
style is a string that specifies the style pre-defined in the USER_SDO_STYLES view or a style object that defines a client side dynamic style. The pre-defined style is specified in the form data-source-name.style-name, where style-name is the name of the style and data-source-name is the name of the data source in which the style is defined.
{int} width
the width of new marker style.
{int} height
the height of new marker style.
Returns:
None

{void} setTopFlag(topFlag)
If you want to display the FOI on the top and above all other FOIs, you should call this function after you create the new the FOI object. This function is only workable for polygon FOI. All point FOIs will be displayed on the top automatically.
Parameters:
{Boolean} topFlag
true if you want to put the polygon FOI on the top of the map, default value is false.
Returns:
None

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

{void} setWidth(width)
This method sets the width of the FOI image for a point FOI. If the FOI is already displayed, it will not be redrawn untill the #reDraw method is called.
Parameters:
{int} width
the width of new marker style.
Returns:
None

{void} setZIndex(idx)
This method sets the z-index (display order) value of the FOI. An FOI with a larger z-index value is displayed above an FOI with a smaller z-index value.
Parameters:
{int} idx
an integer value between 1-999.
Returns:
None

{void} stopAnimation()
This method will stop foi animating.
Returns:
None

{void} updateGeometry(the)
This method sets the geometry of the FOI. The FOI image will be updated to reflect the new geometry representation if the it is already displayed.
Parameters:
{SdoGeometry} the
FOI geometry
Returns:
None

{void} updateImageURL(imgURL, width, height)
This method updates the URL of the image to be displayed as the FOI. The current FOI image will be replaced if the FOI is already displayed on the map.
Parameters:
{String} imgURL
A string that specifies the URL of the new FOI image.
{int} width
the width of new FOI image.
{int} height
the height of new FOI image.
Returns:
None

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