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.
Constructor Attributes | Constructor Name and Description |
---|---|
MVFOI(foiId, geometry, style, FOIServerURL, foiWidth, foiHeight)
|
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.
|
|
enableEventPropagation(enabled)
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.
|
|
enableInfoWindow(enabled)
This method enables or disables the information window when the FOI is clicked.
|
|
This method gets the geometry of the FOI.
|
|
getId()
This method gets the ID of the FOI.
|
|
This method gets the visibility of the FOI.
|
|
reDraw()
This method redraw the FOI if it is already displayed.
|
|
setBringToTopOnMouseOver(bringToTop)
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.
|
|
updateGeometry(the)
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.
|
- 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.
- 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.
- A MVEvent.MOUSE_CLICK event occurs when the user clicks the left mouse key on the FOI.
- A MVEvent.MOUSE_OVER event occurs when the user moves the mouse over the FOI.
- A MVEvent.MOUSE_OUT event occurs when the user moves the mouse out of the FOI.
- A MVEvent.MOUSE_RIGHT_CLICK event occurs when the user right clicks the mouse on the FOI.
- 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
- 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
- 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.
- 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
- Parameters:
- {boolean} enabled
- true (enable event propagation) or false (disable event propagation).
- Returns:
- None
- 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
- 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
- Returns:
- the FOI geometry
- Returns:
- the ID of the FOI.
- Returns:
- true if the FOI is visible, false if the FOI is invisible
- Returns:
- None
- 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
- Parameters:
- {Boolean} clickable
- a Boolean true (the FOI is clickable) or false (the FOI is not clickable).
- Returns:
- None
- Parameters:
- eventType
- listener
- Parameters:
- {int} height
- the height of new marker style.
- Returns:
- None
- 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
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
- Parameters:
- {String} infoTip
- infoTip is the information string.
- Returns:
- None
- 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
- 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
- Parameters:
- {int} opacity
- The parameter opacity should be a number between 0 and 1.
- Returns:
- None
- 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
- Parameters:
- {Boolean} topFlag
- true if you want to put the polygon FOI on the top of the map, default value is false.
- Returns:
- None
- Parameters:
- {Boolean} visible
- visible is a Boolean true (make the FOI visible) or false (make the FOI not visible).
- Returns:
- None
- Parameters:
- {int} width
- the width of new marker style.
- Returns:
- None
- Parameters:
- {int} idx
- an integer value between 1-999.
- Returns:
- None
- Returns:
- None
- Parameters:
- {SdoGeometry} the
- FOI geometry
- Returns:
- None
- 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