featureSelection()

Information

Implementation version: beta 1.00

Description

It modifes the selected element's symbology, changing it in the case of an icon to the corresponding (or auto-generated) selected icon, or changing the element's color to the color and transparency specified as function parameters.

Invocation

featureSelection(
	selectionHandler,
	selectionColor,
	selectionColorAlpha,
	cursorAuto
)

Input parameters

selectionHandler

The type of item selection that will be carried out. Only one individual selection is currently allowed (one item selected at a time), but in the future a multi-selection will be available. It receives the parameter as a text string, which can be:

  1. simple: to carry out an individual selection.
  2. multiSelection: to carry out a multiple selection.

selectionColor

This parameter defines the color that the selected element will take. It receives a text string with the value of the point's hexadecimal color, or name of its color in CSS format For example, '# FF0000' or 'red'.

selectionColorAlpha

Transparency value of the selection color. A numerical transparency value is received, between 0.0 and 1.0.

cursorAuto

Option that changes the mouse cursor from automatic (arrow) to non-selectable (no-drop) when the mouse moves over an entity defined as not selectable. If this parameter is not declared, the value useNoDropCursor is taken by default. It receives a text string, accepting one of these two options:

  1. useAutoCursor: keeps the arrow mouse cursor at all times.
  2. useNoDropCursor: changes the arrow mouse cursor to no-drop.

Use Examples

This method has a passive operation. To use this method, you only have to invoke it after defining the viewer in the code. It is possible to use it on the fly (that is, once the viewer is running).

featureSelection(
	'simple',
	'#55ffff',
	0.6
)