Specific selection in the core client

icon_comment

The sample html file used to create the Custom Tool for specific selection in WebOffice core Client is not part of the standard product scope.

 

This custom tool allows the end user to use various selection tools (see below for a description of these). To do this, configure the custom tool Generic Selection Tool as follows:

 

(1) Web Integration - Generic Selection Tool - Selection

Configure a generic selection tool from the Select tool group with the following parameters:

URL of the external page: pub/CUSTOMTOOL_Selektion/tool_interactiontype_core. htm (this sample html file is not part of the standard product scope.)

Tool tip: Arbitrary assignment of the tooltip name

JavaScript function: callFromWO

ID for external call: Any assignment of the ID (this ID is subsequently used for designing the selection objects)

Visible in Clients: Desktop Clients only (since it was implemented exclusively for the WebOffice core Client)

 

howto_selection_tool_01

Configuration of a Generic Selection Tool

 

icon_cross-reference

For Custom Tools, the selection graph and click icon can be customized. The following design settings can only be used in WebOffice core Client. For more information about configuration, see Web-Integration - generic Tool.

 

(2) Configuration of a custom tool at the node Web Integration - Generic Selection Tool - Selection, which suits your application.

For example, you can configure an advanced custom tool to retrieve the field values of a layer after completing the selection:

howto_selection_tool_02

Configuration of an Advanced Custom Tool

 

icon_cross-reference

For more information on configuring the various Custom Tool types, see the subchapters of the chapter Web-Integration - generic Tool.

 

Explanation of the sample added Custom Tool (the sample html file is not part of the standard product scope)

There are three methods on the Custom Tool (not on the Script API). As a first step, the Custom Tool is fetched via the Script API function:

tool = client. api. getActiveCustomTool ()

 

The selection type is switched using the following method:

tool. _setInteractionType (NONE|POINT|RECTANGLE|RECTANGLE_DISPLAY|.

CIRCLE|LINE|POLYGON );

 

The difference between RECTANGLE and RECTANGLE_DISPLAY is that with RECTANGLE_DISPLAY, a selection graphic (a polygon) remains displayed after the selection box has been opened. To switch the selection type, the tool must have an initial selection type. It must not be configured as tool mode = None.

The following function is available to read out the geometry currently created by the user:

tool. getGeometry ()

 

The geometries are returned as usual with Custom Tools. With the geometry type CIRCLE the values for x, y, radius are transferred as an array with 3 values -[x, y, r].

The following method is available for resetting the geometries via script:

tool. resetGeometry ()

 

In the attached example tool_interactiontype_core. html the buttons for selecting and resetting are disabled by default in WebOffice core Client. This is done via the following line:

tool. hideFormPart (toolcustom_select,"toolcustom_form);

 

After finishing the selection, the coordinates of the drawn object are returned. If a circle is drawn, center coordinate and radius are returned.

When configuring an Advanced Custom Tool, the field values of all objects within the selection object are returned in addition to the coordinate values.

 

howto_selection_tool_03

Selection by rectangle with transfer of the extension in the form of coordinates as well as transfer of the field value of an object, which is inside the box.

 

Detailed description of the individual selection tools

 

Geometry

Click points by type

Point

single click

Line

n-times click; completion by double-click

Circle

CLick and drag; finish by double click

Rectangle

Click and drag; finishes when the mouse button is left pressed

Polygon

n-times click; completion by double-click

Detailed description of the individual selection tools