Class Index

Global Variables

Classes


Class MVCircleTool

MVCircleTool defines a circle tool that can be used to interactively draw a circle on the map by holding down and dragging the mouse.

After the user finishes circle drawing and releases the mouse button, a circular FOI can be generated and displayed on the map until explicitly removed using its clear() method.

Class Summary
Constructor Attributes Constructor Name and Description
 
MVCircleTool(circleStyle, foiServerUrl)
Method Summary
Method Attributes Method Name and Description
 
attachEventListener(event, listener)
This method attaches an event listener to the circle tool.
 
This method clears the circle displayed on the map.
 
detachEventListener(event, listener)
This method detaches an event listener that has previously been attached to the circle tool by #attachEventListener.
 
This method returns the circle center.
 
This method returns the MVSdoGeometry object that specifies the circle on the map.
 
This method returns the circle area FOI after the user finishes drawing circle and releases the mouse left button.
 
This method returns the MVSdoGeometry object that specifies a polygon that proximates the circle on the map.
 
getRadius(unit)
This method returns the proximate radius of the circle in the specified unit.
 
This method gets the status of the circle tool.
 
init()
This method activates and initializes the circle tool.
 
setAreaStyle(areaStyle)
This method sets the rectangle area style used to render the circle area FOI after the user finishes drawing circle and releases the mouse button.
 
setEventListener(event, listener)
This method is deprecated.
 
setPlotDivFillColor(color, opacity)
This method customizes the filling color of the circle border DIV displayed while the user drags the mouse with the left mouse button being pressed.
 
setPlotDivSize(width, height)
This method customizes the style of the circle border DIV displayed while the user drags the mouse with the left mouse button being pressed, and it affects the thickness of the circle border.
 
This method customizes the zindex of the circle border DIV displayed while the user drags the mouse with the left mouse button being pressed, and zindex should be big enough to make circle border DIV visible.
Class Detail
MVCircleTool(circleStyle, foiServerUrl)
Parameters:
{String} circleStyle
a string parameter that specifies the MapViewer style to be used to render the circle area FOI after the user finishes drawing circle and releases the mouse button. The style is specified in the form "data-source-name"."style-name", where "style-name" is the name of the MapViewer area style and "data-source-name" is the name of data source in which the style is defined. If this parameter is omitted or set to null, no circle FOI is generated and displayed after the user releases the mouse button.
{String} foiServerUrl
an optional String parameter that specifies the URL of the FOI server, which should be in the form http://host:port/mapviewer/foi. If this parameter is omitted, the URL of the FOI server is derived from MapViewer base URL.
Returns:
The newly created MVCircleTool object.
Method Detail
{void} attachEventListener(event, listener)
This method attaches an event listener to the circle tool. One of the following types of event listeners can be associated with the circle tool through this method: MVEvent.START, MVEvent.FINISH and MVEvent.DRAG.

No parameter is passed to the listener function when it is invoked.

Parameters:
{String} event
a String that specifies the type of event to be handled by the listener. It can be either MVEvent.START, MVEvent.FINISH or MVEvent.DRAG.
{Function} listener
the reference to listener function.
Returns:
none

{void} clear()
This method clears the circle displayed on the map.
Returns:
none

{void} detachEventListener(event, listener)
This method detaches an event listener that has previously been attached to the circle tool by #attachEventListener.
Parameters:
{String} event
a String that specifies the type of event to be handled by the listener. It can be either MVEvent.START, MVEvent.FINISH or MVEvent.DRAG.
{Function} listener
the reference to listener function.
Returns:
none

{MVSdoGeometry} getCenter()
This method returns the circle center.
Returns:
the circle center.
See:
MVSdoGeometry

{MVSdoGeometry} getCircle()
This method returns the MVSdoGeometry object that specifies the circle on the map.
Returns:
the MVSdoGeometry object that specifies the circle on the map.
Requires:
MVSdoGeometry
See:
MVSdoGeometry

{MVFOI} getCircleFOI()
This method returns the circle area FOI after the user finishes drawing circle and releases the mouse left button.
Returns:
the MVFOI object that represents the circle area FOI after the user finishes drawing circle and releases the mouse left button.
Requires:
MVFOI
See:
MVFOI

{MVSdoGeometry} getCirclePolygon()
This method returns the MVSdoGeometry object that specifies a polygon that proximates the circle on the map.
Returns:
the MVSdoGeometry object that specifies the circle polygon on the map.
Requires:
MVSdoGeometry
See:
MVSdoGeometry

{double} getRadius(unit)
This method returns the proximate radius of the circle in the specified unit.
Parameters:
unit
a string that specifies the name of the distance unit. If omitted, the radius is calculated in the default distance unit of the map coordinate system.
Returns:
the circle radius.

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

{void} init()
This method activates and initializes the circle tool. The application must call this method to activate the circle tool before the user can draw circle on the map.
Returns:
none

{void} setAreaStyle(areaStyle)
This method sets the rectangle area style used to render the circle area FOI after the user finishes drawing circle and releases the mouse button.
Parameters:
{Object} areaStyle
A string or style object which specifies the area 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 MVStyleColor or MVXMLStyle.
Returns:
none

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

{void} setPlotDivFillColor(color, opacity)
This method customizes the filling color of the circle border DIV displayed while the user drags the mouse with the left mouse button being pressed.
Parameters:
{String} color
a String that specifies the filling color, e.g. "#FF0000".
{Number} opacity
a valid number ranging from 0 to 1, e.g. 0.2
Returns:
none

{void} setPlotDivSize(width, height)
This method customizes the style of the circle border DIV displayed while the user drags the mouse with the left mouse button being pressed, and it affects the thickness of the circle border.
Parameters:
{Integer} width
it specifies the width of circle border DIV, e.g. 2
{Integer} height
it specifies the height of circle border DIV, e.g. 2
Returns:
none

{void} setPlotDivZindex(zindex)
This method customizes the zindex of the circle border DIV displayed while the user drags the mouse with the left mouse button being pressed, and zindex should be big enough to make circle border DIV visible.
Parameters:
{Integer} zindex
it should be big enough to make circle border DIV visible, e.g. 5001
Returns:
none

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