Class: WhiteBoardTool

OM.tool. WhiteBoardTool


new WhiteBoardTool(map)

A subclass of OM.tool.Tool that can be used in a white-boarding scenario. The main
use case is for adding dynamic text annotations to any location on the map. Once
added, the text can be edited, rotated, or repositioned on the map.

Note that in order to use the WhiteBoardTool, you must manually include the following
CSS and script tags to the header section of your page.
Specifically, add these two lines before the script tag that imports the oraclemapsv2.js file:

 <link rel='stylesheet' type='text/css' href='/mapviewer/jslib/v2/jquery/css/redmond/jquery-ui-1.8.16.custom.css'/>
 <link rel='stylesheet' type='text/css' href='/mapviewer/jslib/v2/jquery/colorpicker/css/colorpicker.css'/>

Add the following tags after the script tag that imports the oraclemapsv2.js file:

<script type='text/javascript' src='/mapviewer/jslib/v2/jquery/jquery-ui-1.8.16.min.js'></script>
<script type='text/javascript' src='/mapviewer/jslib/v2/jquery/colorpicker/js/colorpicker.js'></script>
<script type='text/javascript' src='/mapviewer/jslib/v2/jquery/colorpicker/js/eye.js'></script>
<script type='text/javascript' src='/mapviewer/jslib/v2/jquery/colorpicker/js/layout.js'></script>
<script type='text/javascript' src='/mapviewer/jslib/v2/jquery/colorpicker/js/utils.js'></script>
Parameters:
Name Type Description
map OM.Map

A map object

Returns:

An instance of OM.tool.WhiteBoardTool

Type
OM.tool.WhiteBoardTool

Extends

Methods


clear()

Clear all text features created by this tool

Returns:
Type
OM.tool.WhiteBoardTool

finish()

Finish the whiteboard tool.

Returns:
Type
OM.tool.WhiteBoardTool

getAllTextFeatures()

Gets all text features which are added by this white board tool

Returns:

all added text features


getGeometry()

Get the generated geometry. This should typically be called from
inside an event listener that is registered to the tool's life cycle
event such as OM.event.ToolEvent.TOOL_END.

Inherited From:
Returns:

the geometry created by the tool

Type
OM.geometry.Geometry

getStatus()

Get the tool's status. Can be one of OM.tool.Tool.STARTED, OM.tool.Tool.STOPPED, or OM.tool.Tool.FINISHED

Inherited From:
Returns:

tool status

Type
int

on()

A shorthand name for the member function addListener.

Inherited From:
Mixes In:

saveToLS(name)

This method saves all text features to localStorage.

Parameters:
Name Type Description
name String

specify the name in localStorage. If not set,
a name will be generated automatically.

Returns:
Type
void

setDrawingStyle(style)

Set the line drawing style

Parameters:
Name Type Description
style OM.style.Line

A line style used to
display the shape boundary as the user is drawing it.

Inherited From:
Returns:

The tool instance

Type
OM.tool.Tool

setStyle(style)

Set rendering style for the completed feature

Parameters:
Name Type Description
style OM.Style

The style to be used for the completed shape

Inherited From:
Returns:

The tool instance

Type
OM.tool.Tool

start()

Start the whiteboard tool.

Returns:
Type
OM.tool.WhiteBoardTool