Class Index

Global Variables

Classes


Class MVRedlineTool

MVRedlineTool defines a redline tool instance with which the user can draw a polyline by clicking and moving the mouse on the map repeatedly. After the redline tool instance is activated, a new redline shape point is created and the redline polyline is extended whenever the user clicks the mouse on the map.

After all shape points have been created, the application can invoke function MVRedlineTool.MVRedlineTool to render a polygon feature constructed with all redline shape points on the map.

Once created, the redline feature (polyline or polygon) stays on the map until the application invokes function MVRedlineTool.clear to remove the redline feature from the map.

Class Summary
Constructor Attributes Constructor Name and Description
 
MVRedlineTool(lineStyle, areaStyle, foiServerURL)
Method Summary
Method Attributes Method Name and Description
 
addVertex(vIdx, xOrdinate, yOrdinate)
This method adds a new shape point.
 
attachEventListener(event, listener)
This method attaches an event listener to handle one of the following redline tool events: MVEvent.NEW_SHAPE_POINT, MVEvent.FINISH, MVEvent.CLEAR and MVEvent.MODIFY.
 
This method clears any lines or polygon rendered by the current MVRedlineTool instance.
 
detachEventListener(event, listener)
This method detaches an event listener that has previously attached to the redline tool by #attachEventListener.
 
This method generates the redline FOI.
 
This method gets the current redline editing mode.
 
This method returns the FOI after the user finishes clicking mouse to generate shape points and invokes function MVRedlineTool.generate to render an FOI on the map.
 
This method gets the redline line segments as an FOI array.
 
This method returns the array of ordinates of the redline geometry.
 
This method gets the redline shape points as an FOI array.
 
This method gets the number of redline shape points.
 
This method returns the MVSdoGeometry object that represents the redline area on the map.
 
This method returns the polygon area FOI after the user finishes clicking mouse to generate polygon shape points and invokes function MVRedlineTool.generate to render a polygon feature on the map.
 
This method returns the MVSdoGeometry object that represents the redline FOI on the map.
 
This method gets the status of the redline tool.
 
init(gtypeArg)
This method initializes the redline tool instance.
 
moveVertex(vertex, xOrdinate, yOrdinate)
This method moves the specified shape point.
 
removeEdge(edge, removeFlag)
This method removes the specified shape line.
 
removeVertex(vertex)
This method removes the specified shape point.
 
setAutoClose(enable(true))
This method sets whether to automatically close the redline and finish redline drawing when the user clicks at the location where the first redline point is located.
 
This method sets the visibility of the control panel.
 
This method sets the redline editing mode.
 
setEventListener(event, listener)
This method is deprecated.
 
setFillArea(enabled)
This method sets whether to fill the redline area when the user is drawing the redline geometry.
 
This method sets whether to display the redline polygon on top of the map.
 
setMarkerImage(imagesrc, imagewidth, imageheight)
This method customizes the marker image used to draw the redline shape points.
 
setRenderingStyle(objType, objStyle)
This method sets the style for redline shape points, lines or polygon areas.
 
setTextStyle(style)
This method set the distance tool's distance info box div style.
Class Detail
MVRedlineTool(lineStyle, areaStyle, foiServerURL)
Parameters:
{String} lineStyle
A string that specifies the style used to render the polyline that connects the redline shape points. The line style is defined in the USER_SDO_STYLES view. The 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} areaStyle
A string that specifies the style used to render the redline polygon. The area style is defined in the USER_SDO_STYLES view. The 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
An optional String parameter that specifies the URL of the FOI server that renders the redline features(line and polygon). The FOI server URL should be in the form http://host:port/mapviewer/foi. If omitted, the URL of the FOI server is derived from the MapViewer base URL.
Returns:
The newly created MVRedlineTool object.
Method Detail
{void} addVertex(vIdx, xOrdinate, yOrdinate)
This method adds a new shape point.
Parameters:
{integer} vIdx
An integer greater than 0 that specifies the index at which the new shape point should be inserted. The index of the first shape point is 0.
{double} xOrdinate
It indicates horizontal ordinate of the new shape point.
{double} yOrdinate
It indicates vertical ordinate of the new shape point.
Returns:
none

{void} attachEventListener(event, listener)
This method attaches an event listener to handle one of the following redline tool events: MVEvent.NEW_SHAPE_POINT, MVEvent.FINISH, MVEvent.CLEAR and MVEvent.MODIFY.
Parameters:
{String} event
a String that specifies the type of event to be handled by the listener. It can only be MVEvent.NEW_SHAPE_POINT, MVEvent.FINISH or MVEvent.MODIFY.
{Function} listener
a javascript listener function. There is no parameter passed to the listener when it is called.
Returns:
none

{void} clear()
This method clears any lines or polygon rendered by the current MVRedlineTool instance. After this method is called, mouse clicks no longer draw on the map.
Returns:
none

{void} detachEventListener(event, listener)
This method detaches an event listener that has previously attached to the redline tool by #attachEventListener.
Parameters:
{String} event
a String that specifies the type of event to be handled by the listener. It can only be MVEvent.NEW_SHAPE_POINT, MVEvent.FINISH, MVEvent.MODIFY or MVEvent.CLEAR.
{Function} listener
a javascript listener function. There is no parameter passed to the listener when it is called.
Returns:
none

{void} generate()
This method generates the redline FOI. The redline FOI is constructed with all redline shape points that the user has created.
Returns:
none

{Object} getEditingMode()
This method gets the current redline editing mode.

The result is a object that specifies whether each of the following editing operations is enabled, point deletion, point dragging, line deletion and line dragging. It has the following attributes:

Returns:
the editing mode.

{MVFOI} getFOI()
This method returns the FOI after the user finishes clicking mouse to generate shape points and invokes function MVRedlineTool.generate to render an FOI on the map.
Returns:
the MVFOI object that represents the generated FOI.
Requires:
MVFOI
See:
MVFOI

{Array} getLineFOIs()
This method gets the redline line segments as an FOI array.
Returns:
the line FOI array.

{Array} getOrdinates()
This method returns the array of ordinates of the redline geometry.
Returns:
the array of ordinates for the redline geometry.

{Array} getPointFOIs()
This method gets the redline shape points as an FOI array.
Returns:
the point FOI array.

{Integer} getPointNumber()
This method gets the number of redline shape points.
Returns:
the number of shape points.

{MVSdoGeometry} getPolygon()
This method returns the MVSdoGeometry object that represents the redline area on the map.
Returns:
MVSdoGeometry object representing the redline area on the map.
Requires:
MVSdoGeometry
See:
MVSdoGeometry

{MVFOI} getPolygonFOI()
This method returns the polygon area FOI after the user finishes clicking mouse to generate polygon shape points and invokes function MVRedlineTool.generate to render a polygon feature on the map.
Returns:
the MVFOI object that represents the polygon area FOI.
Requires:
MVFOI
See:
MVFOI

{MVSdoGeometry} getSdoGeometry()
This method returns the MVSdoGeometry object that represents the redline FOI on the map.
Returns:
MVSdoGeometry object representing the redline area on the map.
Requires:
MVSdoGeometry
See:
MVSdoGeometry

{int} getStatus()
This method gets the status of the redline tool. At any give time, the redline tool can be in one of the following statuses:
Returns:
the status of the redline tool.

{void} init(gtypeArg)
This method initializes the redline tool instance. After this function is invoked, the user can start drawing on the map by clicking and moving the mouse repeatedly.
Parameters:
{int} gtypeArg
an integer which is consistent with gtype value of MVSdoGeometry object, that is, 1 for point, 2 for line and 3 for polygon. Default value is 3 for backward compatibility.
Returns:
none

{void} moveVertex(vertex, xOrdinate, yOrdinate)
This method moves the specified shape point.
Parameters:
{Object} vertex
An integer or FOI object that specifies a shape point to be moved. If it is an integer, it should specify the index of shape point. The index of the first shape point is 0.
{double} xOrdinate
It indicates new horizontal ordinate of the specified shape point.
{double} yOrdinate
It indicates new vertical ordinate of the specified shape point.
Returns:
none

{void} removeEdge(edge, removeFlag)
This method removes the specified shape line.
Parameters:
{Object} edge
An integer or FOI object that specifies a shape line to be removed. If it is an integer, it should specify the index of the shape line. The index of the first shape line is 0.
{String} removeFlag
It specifies which vertex of the specified shape line will be removed. Its value can only be "left" or "right", and default value is "right".
Returns:
none

{void} removeVertex(vertex)
This method removes the specified shape point.
Parameters:
{Object} vertex
An integer or FOI object that specifies the shape point to be removed. If it is an integer, it should specify the index of shape point. The index of the first shape point is 0.
Returns:
none

setAutoClose(enable(true))
This method sets whether to automatically close the redline and finish redline drawing when the user clicks at the location where the first redline point is located. When the redline geometry is closed, a "on_finish" event is fired.
Parameters:
{Boolean} enable(true)
or disable(false) automatic closing.

{void} setControlPanelVisible(visible)
This method sets the visibility of the control panel.
Parameters:
{Boolean} visible
true if visible and false if invisible.
Returns:
none

{void} setEditingMode(mode)
This method sets the redline editing mode. By default, every redline shape point or line can be deleted by selecting the context menu or moved by mouse dragging. The application can call this method to enable or disable each of the following editing operations: point deletion, point dragging, line deletion and line dragging.

The parameter mode is a object that specifies whether to enable or disable any of the above editing operations. The object has the following attributes:

For example, {deletePoint:true, dragPoint:false, deleteLine:true, dragLine:false} enables point deletion and line deletion, while disabling point dragging and line dragging. Null mode value disables all editing operations.

Parameters:
{Object} mode
the object that specifies whether to enable or disable each of the editing operations.
Returns:
none.

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

setFillArea(enabled)
This method sets whether to fill the redline area when the user is drawing the redline geometry.
Parameters:
{Boolean} enabled
fill (true) or not fill(false) the redline area.

setGeneratePolygonTop(to)
This method sets whether to display the redline polygon on top of the map. If set to ture, the generated polygon will be placed above all themebased FOI layers, which might cause the FOIs beneath the redline polygon to be not clickable in Firefox. If set to false, the polygon will be placed under all themebased FOIs, therefor will not affect the clickability of the FOIs.
Parameters:
{Boolean} to
place redline polygon on top(true) or not(false).

{void} setMarkerImage(imagesrc, imagewidth, imageheight)
This method customizes the marker image used to draw the redline shape points.
Parameters:
{String} imagesrc
it specifies the URL of marker image file.
{int} imagewidth
it specifies the width of marker image.
{int} imageheight
it specifies the height of marker image.
Returns:
none

{void} setRenderingStyle(objType, objStyle)
This method sets the style for redline shape points, lines or polygon areas.
Parameters:
{String} objType
It specifies the object for which a style is applied to. Its value can only be MVRedlineTool.STYLE_POINT, MVRedlineTool.STYLE_LINE or MVRedlineTool.STYLE_AREA.
{Object} objStyle
A string or style object which specifies the rendering style. 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} setTextStyle(style)
This method set the distance tool's distance info box div style. It should be in CSS style string. eg:"font-family:Tahoma;"
Parameters:
{String} style
CCS style format
Returns:
none

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