[API](/solutions/geotoolkit/geotoolkit_js/apis/readme) / [geotoolkit](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit) / [flowcharts](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.flowcharts) / [shapes](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.flowcharts#shapes) / [connectors](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.flowcharts#connectors) / [ILink](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.flowcharts#ilink) / ILink

# Class: ILink

[connectors](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.flowcharts#connectors).[ILink](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.flowcharts#ilink).ILink

Base interface for links

**`Interface`**

## Hierarchy

- [`IComponent`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.flowcharts.shapes-5.icomponent.icomponent)
↳ **`ILink`**


## Implemented by

- [`LinkVisual`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.flowcharts.shapes-5.connectors.linkvisual.linkvisual)
- [`PolylineVisual`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.flowcharts.shapes-5.connectors.polylinevisual.polylinevisual)


## Table of contents

Constructors
- [new ILink()](/solutions/geotoolkit/GeoToolkit_JS/apis/classes/geotoolkit.flowcharts.shapes-5.connectors.ilink.ilink.md#new ilink())


Methods
| [connectTo](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.flowcharts.shapes-5.connectors.ilink.ilink#connectto) | [disconnectFrom](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.flowcharts.shapes-5.connectors.ilink.ilink#disconnectfrom) | [getCategory](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.flowcharts.shapes-5.connectors.ilink.ilink#getcategory) |
|  --- | --- | --- |
| [getClassName](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.flowcharts.shapes-5.connectors.ilink.ilink#getclassname) | [getConnections](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.flowcharts.shapes-5.connectors.ilink.ilink#getconnections) | [getDefaultIconSize](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.flowcharts.shapes-5.connectors.ilink.ilink#getdefaulticonsize) |
| [getDefaultSize](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.flowcharts.shapes-5.connectors.ilink.ilink#getdefaultsize) | [getGeometry](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.flowcharts.shapes-5.connectors.ilink.ilink#getgeometry) | [getLinkPoints](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.flowcharts.shapes-5.connectors.ilink.ilink#getlinkpoints) |
| [getOutline](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.flowcharts.shapes-5.connectors.ilink.ilink#getoutline) | [getPrototypeId](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.flowcharts.shapes-5.connectors.ilink.ilink#getprototypeid) | [getPrototypeName](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.flowcharts.shapes-5.connectors.ilink.ilink#getprototypename) |
| [getSearchKeywords](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.flowcharts.shapes-5.connectors.ilink.ilink#getsearchkeywords) | [getUrl](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.flowcharts.shapes-5.connectors.ilink.ilink#geturl) | [setDefaultSize](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.flowcharts.shapes-5.connectors.ilink.ilink#setdefaultsize) |
| [setLinkPoints](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.flowcharts.shapes-5.connectors.ilink.ilink#setlinkpoints) | [setText](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.flowcharts.shapes-5.connectors.ilink.ilink#settext) | [setUrl](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.flowcharts.shapes-5.connectors.ilink.ilink#seturl) |
| [updateBounds](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.flowcharts.shapes-5.connectors.ilink.ilink#updatebounds) | [updateLinks](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.flowcharts.shapes-5.connectors.ilink.ilink#updatelinks) | [getClassName](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.flowcharts.shapes-5.connectors.ilink.ilink#getclassname-1) |


## Contents

Constructors
#### new ILink()

• **new ILink**()

#### Inherited from

IComponent.constructor

Methods
#### connectTo

▸ `Abstract` **connectTo**(`visual`, `linkSide`, `visualModelPoint`): `boolean`

Connects self to the given visual, using the given linkside to the model point (in coordinates of visual)

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `visual` | [`Component`](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.flowcharts#icomponent#component) | a visual to connect to |
| `linkSide` | [`LinkSide`](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.flowcharts#linkside) | link side (begin or end) |
| `visualModelPoint` | [`Point`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.point.point) | model coordinates (in visual model space) |


#### Returns

`boolean`

true on success, false on fail

#### disconnectFrom

▸ `Abstract` **disconnectFrom**(`linkSide`): `void`

Checks if the link visual was previously connected and disconnects if so.
If devicePoint coordinates are specified, then a point with index pointIndex will be set to
model position, calculated from devicePoint value.
The devicePoint X Y values are used to provide "sticky" behavior for hot points.

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `linkSide` | [`LinkSide`](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.flowcharts#linkside) | defines side of the link |


#### Returns

`void`

#### getCategory

▸ `Abstract` **getCategory**(): `string`

Drawing category. The default value is 'default'

#### Returns

`string`

#### Inherited from

[IComponent](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.flowcharts.shapes-5.icomponent.icomponent).[getCategory](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.flowcharts.shapes-5.icomponent.icomponent#getcategory)

#### getClassName

▸ **getClassName**(): `string`

#### Returns

`string`

#### Inherited from

[IComponent](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.flowcharts.shapes-5.icomponent.icomponent).[getClassName](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.flowcharts.shapes-5.icomponent.icomponent#getclassname)

#### getConnections

▸ `Abstract` **getConnections**(): `Record`<[`LinkSide`](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.flowcharts#linkside), [`LinkConnection`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.flowcharts.shapes-5.connectors.linkconnection.linkconnection)&gt;

Gets array of connections

#### Returns

`Record`<[`LinkSide`](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.flowcharts#linkside), [`LinkConnection`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.flowcharts.shapes-5.connectors.linkconnection.linkconnection)&gt;

an array of connections

#### getDefaultIconSize

▸ `Abstract` **getDefaultIconSize**(): [`Dimension`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.dimension.dimension)

#### Returns

[`Dimension`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.dimension.dimension)

#### Inherited from

[IComponent](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.flowcharts.shapes-5.icomponent.icomponent).[getDefaultIconSize](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.flowcharts.shapes-5.icomponent.icomponent#getdefaulticonsize)

#### getDefaultSize

▸ `Abstract` **getDefaultSize**(): [`Dimension`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.dimension.dimension)

Defines default visual size in UI units (pixels by default). Default value is (50, 50)

#### Returns

[`Dimension`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.dimension.dimension)

#### Inherited from

[IComponent](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.flowcharts.shapes-5.icomponent.icomponent).[getDefaultSize](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.flowcharts.shapes-5.icomponent.icomponent#getdefaultsize)

#### getGeometry

▸ `Abstract` **getGeometry**(): [`Node`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.scene.node.node)

gets geometry for the drawing

#### Returns

[`Node`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.scene.node.node)

#### Inherited from

[IComponent](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.flowcharts.shapes-5.icomponent.icomponent).[getGeometry](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.flowcharts.shapes-5.icomponent.icomponent#getgeometry)

#### getLinkPoints

▸ `Abstract` **getLinkPoints**(): [`Point`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.point.point)[]

Gets default link points in model space. If not specified, the 'outline' property will be used.
If 'ouline' is not set, then the shape becomes 'unconnectable'

#### Returns

[`Point`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.point.point)[]

#### Inherited from

[IComponent](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.flowcharts.shapes-5.icomponent.icomponent).[getLinkPoints](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.flowcharts.shapes-5.icomponent.icomponent#getlinkpoints)

#### getOutline

▸ `Abstract` **getOutline**(): [`GraphicsPath`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.graphicspath.graphicspath)

gets outline for the drawing. This outline will be used as path with possible connection along.
By default, no outline will be used

#### Returns

[`GraphicsPath`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.graphicspath.graphicspath)

#### Inherited from

[IComponent](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.flowcharts.shapes-5.icomponent.icomponent).[getOutline](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.flowcharts.shapes-5.icomponent.icomponent#getoutline)

#### getPrototypeId

▸ `Abstract` **getPrototypeId**(): `string`

Returns component class, string value

#### Returns

`string`

#### Inherited from

[IComponent](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.flowcharts.shapes-5.icomponent.icomponent).[getPrototypeId](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.flowcharts.shapes-5.icomponent.icomponent#getprototypeid)

#### getPrototypeName

▸ `Abstract` **getPrototypeName**(): `string`

The name of the component

#### Returns

`string`

#### Inherited from

[IComponent](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.flowcharts.shapes-5.icomponent.icomponent).[getPrototypeName](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.flowcharts.shapes-5.icomponent.icomponent#getprototypename)

#### getSearchKeywords

▸ `Abstract` **getSearchKeywords**(): `string`[]

Cue words for the component search. By default, the shape will not be searched

#### Returns

`string`[]

#### Inherited from

[IComponent](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.flowcharts.shapes-5.icomponent.icomponent).[getSearchKeywords](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.flowcharts.shapes-5.icomponent.icomponent#getsearchkeywords)

#### getUrl

▸ `Abstract` **getUrl**(): `string`

Gets URL for an icon

#### Returns

`string`

#### Inherited from

[IComponent](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.flowcharts.shapes-5.icomponent.icomponent).[getUrl](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.flowcharts.shapes-5.icomponent.icomponent#geturl)

#### setDefaultSize

▸ `Abstract` **setDefaultSize**(`dimension`): [`ILink`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.flowcharts.shapes-5.connectors.ilink.ilink)

Defines default visual size in UI units (pixels by default). Default value is (50, 50)

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `dimension` | [`Dimension`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.dimension.dimension) | new default dimension |


#### Returns

[`ILink`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.flowcharts.shapes-5.connectors.ilink.ilink)

this

#### Inherited from

[IComponent](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.flowcharts.shapes-5.icomponent.icomponent).[setDefaultSize](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.flowcharts.shapes-5.icomponent.icomponent#setdefaultsize)

#### setLinkPoints

▸ `Abstract` **setLinkPoints**(`points`): `void`

Sets link points. Link points must be defined in the shapes's model
space

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `points` | [`Point`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.point.point)[] | an array of model-space points that represent possible connections |


#### Returns

`void`

#### Inherited from

[IComponent](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.flowcharts.shapes-5.icomponent.icomponent).[setLinkPoints](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.flowcharts.shapes-5.icomponent.icomponent#setlinkpoints)

#### setText

▸ `Abstract` **setText**(`textOptions`): [`ILink`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.flowcharts.shapes-5.connectors.ilink.ilink)

Sets text and its options

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `textOptions` | [`Text`](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.flowcharts#icomponent#text) | text and/or its options |


#### Returns

[`ILink`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.flowcharts.shapes-5.connectors.ilink.ilink)

this instance

#### Inherited from

[IComponent](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.flowcharts.shapes-5.icomponent.icomponent).[setText](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.flowcharts.shapes-5.icomponent.icomponent#settext)

#### setUrl

▸ `Abstract` **setUrl**(`url`): [`ILink`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.flowcharts.shapes-5.connectors.ilink.ilink)

#### Parameters

| Name  | Type  |
|  --- | --- |
| `url` | `string` |


#### Returns

[`ILink`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.flowcharts.shapes-5.connectors.ilink.ilink)

this

#### Inherited from

[IComponent](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.flowcharts.shapes-5.icomponent.icomponent).[setUrl](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.flowcharts.shapes-5.icomponent.icomponent#seturl)

#### updateBounds

▸ `Abstract` **updateBounds**(): [`ILink`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.flowcharts.shapes-5.connectors.ilink.ilink)

Update shape bounds

#### Returns

[`ILink`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.flowcharts.shapes-5.connectors.ilink.ilink)

#### updateLinks

▸ `Abstract` **updateLinks**(`force?`): `void`

Gets array of connections

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `Optional` `force` | `boolean` | force |


#### Returns

`void`

#### getClassName

▸ `Static` **getClassName**(): `string`

#### Returns

`string`

#### Inherited from

[IComponent](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.flowcharts.shapes-5.icomponent.icomponent).[getClassName](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.flowcharts.shapes-5.icomponent.icomponent#getclassname-1)