CreditDisplay
external class CreditDisplay(var container: HTMLElement, delimiter: String? = definedExternally, viewport: HTMLElement? = definedExternally)(source)
The credit display is responsible for displaying credits on screen.
// Add a credit with a tooltip, image and link to display onscreen
const credit = new Credit(`<a href="https://cesium.com/" target="_blank"><img src="/images/cesium_logo.png" title="Cesium"/></a>`, true);
viewer.creditDisplay.addStaticCredit(credit);
Content copied to clipboard
// Add a credit with a plaintext link to display in the lightbox
const credit = new Credit('<a href="https://cesium.com/" target="_blank">Cesium</a>');
viewer.creditDisplay.addStaticCredit(credit);
Content copied to clipboard
Parameters
delimiter
The string to separate text credits Default value - '•'
viewport
The HTML element that will contain the credits popup Default value - document.body
See also
Constructors
Link copied to clipboard
constructor(container: HTMLElement, delimiter: String? = definedExternally, viewport: HTMLElement? = definedExternally)
Functions
Link copied to clipboard
Adds a Credit that will show on screen or in the lightbox until the next frame. This is mostly for internal use. Use CreditDisplay.addStaticCredit to add a persistent credit to the screen.
Link copied to clipboard
Adds a Credit that will show on screen or in the lightbox until removed with CreditDisplay.removeStaticCredit.
Link copied to clipboard
Resets the credit display to a beginning of frame state, clearing out current credits.
Link copied to clipboard
Returns true if this object was destroyed; otherwise, false.
Link copied to clipboard
Removes a static credit shown on screen or in the lightbox.