Credit

new Cesium.Credit(html, showOnScreen)

A credit contains data pertaining to how to display attributions/credits for certain content on the screen.
Name Type Default Description
html String An string representing an html code snippet (can be text only)
showOnScreen Boolean false optional If true, the credit will be visible in the main credit container. Otherwise, it will appear in a popover
Throws:
  • DeveloperError : options.text, options.imageUrl, or options.link is required.
Example:
//Create a credit with a tooltip, image and link
var credit = new Cesium.Credit('<a href="https://cesiumjs.org/" target="_blank"><img src="/images/cesium_logo.png" title="Cesium"/></a>');

Members

readonlyelement : HTMLElement

Gets the credit element

readonlyhtml : String

The credit content

readonlyimageUrl : String

The source location for the image.
A URL location for the credit hyperlink

readonlyshowOnScreen : Boolean

Whether the credit should be displayed on screen or in a lightbox

readonlytext : String

The credit text

Methods

staticCesium.Credit.equals(left, right)Boolean

Returns true if the credits are equal
Name Type Description
left Credit The first credit
right Credit The second credit
Returns:
true if left and right are equal, false otherwise.

equals(credit)Boolean

Returns true if the credits are equal
Name Type Description
credit Credit The credit to compare to.
Returns:
true if left and right are equal, false otherwise.

hasImage()Boolean

Returns true if the credit has an imageUrl
Returns:
Returns true if the credit has a link
Returns: