Class: Overlay3DTool<ContentType>
Defined in: packages/tools/src/Overlay3D/Overlay3DTool.ts:82
Tool for adding and interacting with 2D overlays positioned at points in
Extends
Type Parameters
ContentType
ContentType
= DefaultOverlay3DContentType
Constructors
Constructor
new Overlay3DTool<
ContentType
>(viewer
,toolParameters?
):Overlay3DTool
<ContentType
>
Defined in: packages/tools/src/Overlay3D/Overlay3DTool.ts:97
Parameters
viewer
toolParameters?
Returns
Overlay3DTool
<ContentType
>
Overrides
Cognite3DViewerToolBase
.constructor
Methods
clear()
clear():
void
Defined in: packages/tools/src/Overlay3D/Overlay3DTool.ts:193
Removes all overlays.
Returns
void
createOverlayCollection()
createOverlayCollection(
overlays?
,options?
):OverlayCollection
<ContentType
>
Defined in: packages/tools/src/Overlay3D/Overlay3DTool.ts:114
Creates new OverlayCollection.
Parameters
overlays?
OverlayInfo
<ContentType
>[]
Array of overlays to add.
options?
Returns
OverlayCollection
<ContentType
>
Overlay group containing it's id.
dispose()
dispose():
void
Defined in: packages/tools/src/Overlay3D/Overlay3DTool.ts:249
Dispose of resources used by this tool
Returns
void
Overrides
Cognite3DViewerToolBase
.dispose
getCollections()
getCollections():
OverlayCollection
<ContentType
>[]
Defined in: packages/tools/src/Overlay3D/Overlay3DTool.ts:152
Gets all added overlay collections.
Returns
OverlayCollection
<ContentType
>[]
getTextOverlayVisible()
getTextOverlayVisible():
boolean
Defined in: packages/tools/src/Overlay3D/Overlay3DTool.ts:186
Gets whether text overlay is visible.
Returns
boolean
getVisible()
getVisible():
boolean
Defined in: packages/tools/src/Overlay3D/Overlay3DTool.ts:171
Gets whether overlays are visible.
Returns
boolean
off()
Call Signature
off(
event
,eventHandler
):void
Defined in: packages/tools/src/Overlay3D/Overlay3DTool.ts:226
Unregisters an event handler for the 'disposed'-event.
Parameters
event
"hover"
eventHandler
OverlayEventHandler
<ContentType
>
Returns
void
Overrides
Call Signature
off(
event
,eventHandler
):void
Defined in: packages/tools/src/Overlay3D/Overlay3DTool.ts:227
Parameters
event
"click"
eventHandler
OverlayEventHandler
<ContentType
>
Returns
void
Overrides
Cognite3DViewerToolBase.off
Call Signature
off(
event
,eventHandler
):void
Defined in: packages/tools/src/Overlay3D/Overlay3DTool.ts:228
Parameters
event
"disposed"
eventHandler
Returns
void
Overrides
Cognite3DViewerToolBase.off
on()
Call Signature
on(
event
,eventHandler
):void
Defined in: packages/tools/src/Overlay3D/Overlay3DTool.ts:206
Subscribes to overlay events.
Parameters
event
"hover"
event to subscribe to.
eventHandler
OverlayEventHandler
<ContentType
>
Returns
void
Overrides
Cognite3DViewerToolBase.on
Call Signature
on(
event
,eventHandler
):void
Defined in: packages/tools/src/Overlay3D/Overlay3DTool.ts:207
Subscribes to overlay events.
Parameters
event
"click"
event to subscribe to.
eventHandler
OverlayEventHandler
<ContentType
>
Returns
void
Overrides
Cognite3DViewerToolBase.on
Call Signature
on(
event
,eventHandler
):void
Defined in: packages/tools/src/Overlay3D/Overlay3DTool.ts:208
Subscribes to overlay events.
Parameters
event
"disposed"
event to subscribe to.
eventHandler
Returns
void
Overrides
Cognite3DViewerToolBase.on
removeOverlayCollection()
removeOverlayCollection(
overlayCollection
):void
Defined in: packages/tools/src/Overlay3D/Overlay3DTool.ts:137
Removes overlays that were added with addOverlays method.
Parameters
overlayCollection
OverlayCollection
<ContentType
>
Id of the overlay group to remove.
Returns
void
setTextOverlayVisible()
setTextOverlayVisible(
visible
):void
Defined in: packages/tools/src/Overlay3D/Overlay3DTool.ts:179
Sets whether text overlay is visible. Default is false.
Parameters
visible
boolean
Returns
void
setVisible()
setVisible(
visible
):void
Defined in: packages/tools/src/Overlay3D/Overlay3DTool.ts:159
Sets whether overlays are visible.
Parameters
visible
boolean
Returns
void